- Upvotes Received
- 4
- Posts with Upvotes
- 3
- Upvoting Members
- 4
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
20 Posted Topics
Hi, AlexRivera, What does happens during execution of the program in the part you have pointed out? Is the loop infinite?
The multimap allows you to store key value pairs with the same key. It has functions like count which would be useful for your type of thing. You can read it up here: [url]http://www.cplusplus.com/reference/stl/multimap/[/url]
Hi gamerchick. So, what is the problem?
Hi Ayesha91, How is the order of the letters in the file? Is each ring separated by spaces or each individual ring is on a separate line?
Hi green_leav, Who provides the test cases? What I mean by this is, do you have to devise the rings and secret words yourself i.e KFZLQMDWJUSHGCEIXRAOPNVTYB IMWZPFJBKLTNOEQDHUXGVYASRC FAMIETZORWPSQUNGLDYBKXHCVJ XNAKVPICQHDFWEGBRTMLZOUSYJ ZSYFDOWIJCAKPBTXLRUNGQMVHE or do you have to devise the program which at runtime will take a set of keys during the test? …
Hi Wilen, What does your code look like?
Hi, GetLength should not be void and should return an int so rather [CODE] int MyString::getLength(char []) [/CODE]
Hi, If the first name second name and phone number are consistently in this order throughout the file then an ifstream read object in a while loop may work; [CODE] read>>firstnamearray[n]>>lastname[n]>>phonenumberarray[n]; n++; [/CODE]
Hi, I take it it does not compile. I think you would need a good c++ book. Because just to pick things up to create what you are trying to create. Firstly before the template declaration you need the statement "using namespace std;" the class members xsize, ysize, grid need …
Hi, I think your problem is actually in the [CODE] void SortNumbers() { cout <<"the sorted list is "; for(i= 0; i <scores[9]; i++) { if(scores[i]>scores[i+1]) Swap(scores, i); cout << scores[i] << " "; } cout << endl; } [/CODE] for(i= 0; i <[COLOR="Red"]scores[9][/COLOR]; i++) rather I think your want …
Hi, Why not make an array of strings and return to a pointer. So rather you have [CODE] string * Test::getNames(string[] names) { string y[0] = "dog"; y[1] = "happy"; y[2] = "night";" return y; } [/CODE] that might work.
Hi tasky23, You need a bit more to open the file. Declaring an instance of ifstream is the correct start but it should read: [CODE] ifstream infile2; //then to open the file. infile2.open("file.txt",ios::in); [/CODE] then you may do your infile2 >> Player[0].Name; Hope that gets you on the right path.
Hi, I think you mean [CODE] int calcTotal(int sales[6][2]) { //declare variables int company = 0; //sales accumulator for (int row = 0; row < 6; row = row + 1) for (int col = 0; col < 2; col = col + 1) //accumulate sales company = company + …
In your while(ture) statement where you ask the user to to select an option you have [CODE] cin>>cInput; [/CODE] immediately proceeding that put cin.ignore() to remove the '\n' which is always left in the input stream following the use of cin>>. So it should look like this. [CODE] cin>>cInput; cin.ignore(); …
Hi, I see you typo it should rather read [CODE]typedef int HashElement[/CODE] You misspelled typedef. Also as Ancient Dragon says include using std::string; A piece of advice, in all your c++ programs always put without fail using namespace std; to read something like [CODE] #include <abcde> #include <efghij> using namespace …
Hi, please may you explain again what is happening because in the first post you said the error message is being printed out no matter what and in your second you mention you are dealing with complex roots and need the message but nothing happens at the moment.
You seem to capture the customer details correctly from the user but when you create a new Customer() [CODE] Customer *c = new Customer(); theBank.addCustomer(*c); [/CODE] how are you passing the customer details to the customer object i.e customer name, address, date of birth etc...? [CODE] Customer *c = new …
The main method reads like [CODE] int main() { Windows variable1; variable1.inputInfo(); variable1.outputInfo(); return(0); } [/CODE] You have created an instance of Windows class in which you have overridden the inputInfo method inherited from the Operating systems class. What you need to do is: [CODE] void Windows::inputInfo() { unsigned long …
So you want to write to the file, yes? In that case you need to use ofstream So you would say something like this: [CODE] std::osfstream readout; readout.open("file.txt", iso::app); readout<<naziv_student<<" "<<";"<<visina<<"\n"; [/CODE] You might also want to explain the nature of the task i.e are you doing an exercise in …
The End.
GrubSchumi