- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
19 Posted Topics
Re: Where does `void test(char*[], char*);` come from? I assume you meant `void check(...)`. The reason why it doesn't reach your function, is because your `main()` function is unaware of the fact that the `check` function exists. This can be fixed by either placing the `check(...)` function above the `main()` function … | |
Re: Referring to your title: You do know that an one dimensional space is only a line, right? Referring to your second post: An array is an array, it is a collection of elements, hence not a row nor a column. | |
Re: The constructor of employee takes three arguments, but you use only two arguments. `public employee(String office, String salary, MyDate DATE_HIRED)` Hence a valid employee construction would be: `employee foo = new employee("Engine Company", "5000", new MyDate(4, 7, 2012)` Keep in mind that your employee class is named `employee` and NOT … | |
Re: What zeroliken is saying that you use C methods to open a file, C++ methods for in/out stream. Do you want to open the file with C or C++ code? And you should ALWAYS close files when you do not need them anymore, not to mention ALWAYS use `int main()` … | |
Re: 1. You call return before `tf = false`, hence `tf = false` will never be executed. 2. When `value1 == value2`, nothing is returned. Be sure to always return something. When these are fixed, then it should work. | |
Re: 1. yes 2. O(n-1) = O(n) 3. yes, although you probably made a typo here: `for(x = 0; x < n; i++)` instead of `x++` 4. yes, assuming you use the algorithm as in your example 5. yes, assuming you use the algorithm as in your example Some additional info: … | |
Hi. Sooner or later I had to go into the depths of C. Today was the day I tried my first things with C. However, I am having a problem although I do not know what actually causes it. The goal of the pogram is to combine the parameters into … | |
Re: Replace every getline (infile, infoName); with infile >> infoName; solves your problem. It goes in an endless loop because the second time getline() is called, a error is returned. So `inline.eof()` will always be false, so you get `while(true)`, hence the endless loop. This is caused by the pointer in … | |
Re: Your question is pretty vague, can you be a bit more clear on that? Do you want it to open a web browser when it is 12:00 PM or a specific web page? Or what do exactly mean? | |
Re: Something like this?[CODE]// I edit your code on some parts, because I assumed it were mistakes void insertSeats (char (*seats)[5]) { int row = 1; char A = 'x'; // you should initialize A before you use it (like you did in the x-line) for (int i = 0; i … | |
Re: Please use the code-tags. And I don't quite understand your question. What do you mean with 'it runs clock 5 minutes'? | |
Re: You could also do this for the same result, so that you can remove the whole attr part. [CODE] CreateDirectory(str.c_str(), NULL); [/CODE] Your code seems fine. I don't know why you have added sprintf() but I surely did not need it to make a directory. The only error you could … | |
Re: First of all I am suprised that the first code you works. Reason? You did not initialize ch, yet you are able the output it the first time you do the while loop. But I'll answer your question: A while loops ends when the condition becomes false, but it finishes … | |
Re: [QUOTE=swolll;1008467][CODE] ... cout << endl << "Detailed employee reports have been printed in " << fileOutput1 << "." << endl << endl; cout << "Enter input file name for company payroll report. (Can be same as first input file.): " << endl; getline(fin, fileInput2); // The error lies in this … | |
Re: If you want to read a string from a file (I assume you meant a text file?), then you could use this:[CODE] ifstream in("C:\\Physical-Address.txt");// are you sure it's C:\\ and not C:\? if (!in) { cout << "There was a problem with opening the file for reading." << endl; } … | |
Re: > When i choose the option 1 to get interest rate and years, nothing comes up...it is blank. Then (with it blank) i can enter one of the options, then i gives me the answer. So i dont think that it is reading the .txt correctly. cout<< "Would you like … | |
Re: [QUOTE=programmingnova;1004587]I've attempted the first four calculations below; where is my code incorrect for these steps? [CODE] ... while (doagain == 'y'); // remove this ; { cout << "Enter your major (0=CIS, 1=Math): "; cin >> major; cout << "Enter your last name: "; cin >> lastname; cout << "Enter … | |
Re: It is possible without using a string. The coding will not be that hard. First of all. Char is just a single character. To put more than 1 character in this variable, you need to write: [CODE]char name [10];[/CODE] Keep in mind that you need to put the length of … | |
Hello. I am a new member of this web site. The reason for joining is that when I experienced some problems , I found most solutions on this website. Sadly, I cannot find all answers to my problems. That's why I am here now and I want to ask you … |
The End.