| | |
Passing stack to a function
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Mar 2008
Posts: 105
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 application array arrays based beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete deploy developer dll dynamiccharacterarray email encryption error file format forms fstream function functions game generator getline graph homeworkhelp homeworkhelper iamthwee ifstream image input int java lib list loop looping loops map math matrix memory multidimensional multiple newbie news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference rpg simple sorting string strings template text tree url vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets







You are absolutely right.