| | |
Passing stack to a function
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Mar 2008
Posts: 102
Reputation:
Solved Threads: 0
hi,
How can i pass a stack to the function. I am getting compilation error. Following is my code.
Please tell me what is wrong.
Thanks,
How can i pass a stack to the function. I am getting compilation error. Following is my code.
C++ Syntax (Toggle Plain Text)
class circuit { public: int append_and_file(stack<int> &); /* Some other variables defined */ } int circuit::unroll() { append_and_file(add_stack_ppi); } int circuit::append_and_file(stack<int> &stack_ref) { int var=0; int num_clauses = 0; stack_ref.push(2); }
Thanks,
Last edited by Ancient Dragon; Jan 5th, 2009 at 3:34 pm. Reason: add code tags
Missing ; after } for class prototype:
C++ Syntax (Toggle Plain Text)
class circuit { public: int append_and_file(stack<int> &); /* Some other variables defined */ };
•
•
•
•
Missing ; after } for class prototype:
C++ Syntax (Toggle Plain Text)
class circuit { public: int append_and_file(stack<int> &); /* Some other variables defined */ };
![]() |
Similar Threads
- Help with ARM asm issue (Assembly)
- Help to hold data to place on stack/queue (C++)
- Writing a Program using "pass-by-reference" functions. (C++)
- Passing an Array to Function Problem (C++)
- Class Template used for stack (C++)
- Binary GCD algorithm in MIPS (Assembly)
- Help needed for a project concerning protected mode (Assembly)
- Passing An Connecting String (ASP.NET)
- Recursion (C++)
Other Threads in the C++ Forum
- Previous Thread: Change button background
- Next Thread: C++ File IO Operations
| Thread Tools | Search this Thread |
api array based binary bitmap c++ c/c++ calculator char char* class classes code coding compile console conversion count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int java lib linkedlist linker linux list loop looping loops map math matrix memory multiple news node number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets







You are absolutely right.