פיצול מחלקה ב ++c
אני באמצע בניית מחלקה שלעת עתה עובדת. ואני רוצה לפצל כל מטלה בנפרד.
הודעות שגיאה:
\root\factorization.cpp|43|error: 'factor' has not been declared|
\root\factorization.cpp||In function 'int counter()':|
\root\factorization.cpp|45|error: 'entire' was not declared in this scope|
\root\factorization.cpp|45|error: 'divisor' was not declared in this scope|
\root\factorization.cpp|47|error: 'temp' was not declared in this scope|
\root\factorization.cpp|49|error: 'doc' was not declared in this scope|
\root\factorization.cpp|58|error: 'SIZE' was not declared in this scope|
\root\factorization.cpp|61|error: 'doc' was not declared in this scope|
||=== Build finished: 7 errors, 0 warnings ===|
אגב,
אם אני מעוניין להחזיר מ factor::counter() יותר ממשתנה אחד. בתוספת, Length עבור אורך המערך, doc עבור מיקום הנקודה.
האם להשתמש במצביעים ? או שכדאי לפצל את המבנה ולהחזיר את המבנה החדש ?
תודה למשיבים.
אני באמצע בניית מחלקה שלעת עתה עובדת. ואני רוצה לפצל כל מטלה בנפרד.
הודעות שגיאה:
\root\factorization.cpp|43|error: 'factor' has not been declared|
\root\factorization.cpp||In function 'int counter()':|
\root\factorization.cpp|45|error: 'entire' was not declared in this scope|
\root\factorization.cpp|45|error: 'divisor' was not declared in this scope|
\root\factorization.cpp|47|error: 'temp' was not declared in this scope|
\root\factorization.cpp|49|error: 'doc' was not declared in this scope|
\root\factorization.cpp|58|error: 'SIZE' was not declared in this scope|
\root\factorization.cpp|61|error: 'doc' was not declared in this scope|
||=== Build finished: 7 errors, 0 warnings ===|
אגב,
אם אני מעוניין להחזיר מ factor::counter() יותר ממשתנה אחד. בתוספת, Length עבור אורך המערך, doc עבור מיקום הנקודה.
האם להשתמש במצביעים ? או שכדאי לפצל את המבנה ולהחזיר את המבנה החדש ?
תודה למשיבים.