Forum: C++ Sep 6th, 2009 |
| Replies: 8 Views: 399 ah I seemed to have done that for all the member functions and not just isEmpty, fixing that seems to have fixed the template error message but uncovered a makefile error. If i have questiongs i know... |
Forum: C++ Sep 6th, 2009 |
| Replies: 8 Views: 399 so i should replace "Storeable" with "Type" ? My teacher didn't say much about templates, i was under the impression that you can put whatever word you wanted like a variable. The book im looking at... |
Forum: C++ Sep 6th, 2009 |
| Replies: 8 Views: 399 sorry about that
template <class Storeable>
struct nodeType
{
Storeable info;
nodeType<Storeable> *link;
}; |
Forum: C++ Sep 6th, 2009 |
| Replies: 8 Views: 399 Iv always had trouble with templates and I always get the same error message "Error: Templates can only declare classes or functions."
program is a template linked list class and I'm using the sun... |
Forum: C++ Apr 11th, 2009 |
| Replies: 1 Views: 356 hi, i am trying to write a simulation for a very simple ALU and am having trouble with the AND/OR operations. I want to AND/OR integers bit wise with the two integers being passed to a function in... |
Forum: C++ Apr 9th, 2009 |
| Replies: 5 Views: 629 yes if i compile the file manually it produces an executable, and yes to your second question as well, the sun studio 12 suite i believe its called |
Forum: C++ Apr 9th, 2009 |
| Replies: 5 Views: 629 yes, but you cannot use the tab key in the forum message box so i used spaces to simulate the tab. The actual make file has tabs and the newline so i know those are not the problem, also I am using... |
Forum: C++ Apr 8th, 2009 |
| Replies: 5 Views: 629 hi, this is embarrassing, for whatever reason I am getting "Don't know how to make target driver.o" whenever i type make. There is only one file named "driver.cpp" in the directory that i have to... |
Forum: C++ Dec 6th, 2008 |
| Replies: 11 Views: 745 nvm i figured it out
thanks for the help everyone |
Forum: C++ Dec 6th, 2008 |
| Replies: 11 Views: 745 now whenever an expression that starts with a close group symbol it asserts an error at "else if(exp[x] == '}')" for all close group symbols.
it does this for expressions like:
)A(
AEW}de{
... |
Forum: C++ Dec 6th, 2008 |
| Replies: 11 Views: 745 i understand, i will make the corrections and try agin
thank you very mutch |
Forum: C++ Dec 6th, 2008 |
| Replies: 11 Views: 745 so i got it kinda working in the sense that no matter what is input the program evaluates the expression as unbalanced here is the code
void eval()
{
string exp;
int num;... |
Forum: C++ Dec 5th, 2008 |
| Replies: 11 Views: 745 thanks everyone i will put everything together and see if it works |
Forum: C++ Dec 5th, 2008 |
| Replies: 11 Views: 745 the program i have to write involves a dynamically linked stack to evaluate if the grouping symbols '(' , ')' , '{' , '}' , '[' , ']' in expressions are balanced. The expression is input through... |
Forum: C++ Nov 20th, 2008 |
| Replies: 3 Views: 416 |
Forum: C++ Nov 20th, 2008 |
| Replies: 3 Views: 416 whenever the clearMemory function is called i get a segmentation fault and i can not figure out whats wrong. The function is supposed to delete all pointers. The function brings in the pointer to... |
Forum: C++ Sep 15th, 2008 |
| Replies: 6 Views: 872 That did it. Thanks for the help everyone. |
Forum: C++ Sep 15th, 2008 |
| Replies: 6 Views: 872 your right, my mistake. After a couple of hours of sleep i see i read his post completely wrong.
ill test and see if what was suggested works. |
Forum: C++ Sep 15th, 2008 |
| Replies: 6 Views: 872 the break statement is intended to exit the for loop after it loads the country variable into the member nation with "xxx", if i did not have it in there the for loop would load the first country it... |
Forum: C++ Sep 14th, 2008 |
| Replies: 6 Views: 872 My goal is to read Olympic data into an array of structs. What i need to read in is the country code, and number of gold, silver or bronze medals that the country won. Also if one country won more... |