1,608 Posted Topics

Member Avatar for angel22

It's up to your professor what s/he will accept. You'll be a better judge than any of us. Looking at your code quickly my biggest concern is I'm not sure how you are keeping track of the original indexes of each last name within your program sp you can match …

Member Avatar for Rashakil Fol
0
101
Member Avatar for wishes

Use code tags to post relevant code with error messages. The error messages should be in order of presentation by the compiler, as frequently if you fix the first error message the others go away as well.

Member Avatar for wishes
0
133
Member Avatar for wu7jian

>namespaces are just logical units holding whatever belongs in a logical way together. That's about as good a description of namespaces as I've seen. However, cstdio.h isn't in namespace std either. cstdio is in namespace std (notice no .h) whereas stdio.h isn't in namespace std but has (just about) the …

Member Avatar for Lerner
0
195
Member Avatar for angel22

Doing this without using struct/classes will be tedious. You could have an array of firstnames only, an array of last names only, an array of middle names only, an array for each persons first exam grades, an array for each persons second exam grades, ..., an array for each persons …

Member Avatar for angel22
0
549
Member Avatar for angel22

In the OP sentence was declared thus: string sentence[size]; Therefore, in the syntax used by the OP sentence is an array of string of size size. Therefore to refer to a given char of a given string you would need to use multidimensional []s. However, why use that syntax? It's …

Member Avatar for winbatch
0
232
Member Avatar for wu7jian

>is that means when i declare a instance of the class i need also declare a instance of the struct? No. You can have one (or more) lists and each list can have zero to N links/nodes/whatever. You have declared a list object in main(), which is fine, without declaring …

Member Avatar for wu7jian
0
150
Member Avatar for angel22

You can check for palindrome(ness) using many different techniques. You could reverse the entire string and compare the original string with the reverse to see if it is the same, but that requires knowledge of how to compare strings (winbatch has indicated some of the ways to do that). An …

Member Avatar for angel22
0
395
Member Avatar for pscha3

[code] while(!Data.eof()) { cout<<ch; Data.get(ch); } Data.close(); [/code] I don't have access to a compiler at this time, but I suspect that the problem has to do with the above snippet. When you find EOF so eof() returns true and ! eof() becomes false, something else happens. In particular I …

Member Avatar for pscha3
0
165

The End.