| | |
Passing stack to a function
![]() |
•
•
Join Date: Mar 2008
Posts: 97
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 build c++ c++intmain() c/c++ char class classes client code coding compile console conversion count counttheoccurenceofanintegerinthe10inputs delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption environment error file forms fstream function functions game givemetehcodez graph gui homeworkassignment homeworkhelp homeworkhelper i/o iamthwee ifstream input int integer java lib linkedlist linker loop looping loops map math matrix memory multiple multipledimensionarray news node number numbertoword output parameter pointer problem program programming project python radix random read recursion reference rpg string strings temperature template test text text-file tree url variable vector video win32 windows winsock word wordfrequency wxwidgets







You are absolutely right.