Forum: C++ Aug 4th, 2005 |
| Replies: 2 Views: 1,459 HI:
Maybe some of you read my thread about how to sort a file that contained 17 students data:
ID LASTNAME FIRSTNAME 10 SCORES
My program had to read this file, sort the names... |
Forum: C++ Aug 3rd, 2005 |
| Replies: 17 Views: 3,753 Thank you, I will work this problem later at school!
Now, i have to leave!
i'll see how it goes, and if i'm able to do it! well i hope! |
Forum: C++ Aug 3rd, 2005 |
| Replies: 17 Views: 3,753 For the last name and first name is it possible to say?
string firstname, lastname;
int score[10];
then while readign the file:
while (infile>>ID)
{ |
Forum: C++ Aug 3rd, 2005 |
| Replies: 17 Views: 3,753 These are the specifications the teacher gave us to include in the project!
I hope you can see now what I am supposed to do so it is easier for me to start correctly!
Write a program to compute... |
Forum: C++ Aug 3rd, 2005 |
| Replies: 17 Views: 3,753 But tell me something, to sort the names, is it possible to do it without arrays or not.
The thing is that I am not sure if I can use a string array that contains both the first, and last name,... |
Forum: C++ Aug 3rd, 2005 |
| Replies: 17 Views: 3,753 Do you mean that I can open the first file and once opened I can insert the ID, first name, last name, 10 scores, for each of the 17 students in different arrays, and after that sort them... |
Forum: C++ Aug 3rd, 2005 |
| Replies: 17 Views: 3,753 I am still working on this problem, but I cannot find a way to finish it without mixing up all the scores and the names.
Is there a way to sort the names without mixing the scores with anyone... |
Forum: C++ Aug 2nd, 2005 |
| Replies: 17 Views: 3,753 I've working with this, and I have already solved the formatting problem, my only problem left is how to put the names in order!
This is how I changed it a little, I just included some width and... |
Forum: C++ Aug 2nd, 2005 |
| Replies: 17 Views: 3,753 For example:
The output for let's say two students would be:
Cannon, Scott 70 75 78 88 83 85 79 91 88 90 82.7 B
Espinola, Angelica 97 98 89 88 90 92 95 100 92 88 99.1 A
... |
Forum: C++ Aug 2nd, 2005 |
| Replies: 17 Views: 3,753 Hello:
I need help with a project.
I have to read an input file that contains data for 17 students. This is how they are: first ID, then first name, then last name, then 10 test scores.
For... |
Forum: C++ Aug 1st, 2005 |
| Replies: 1 Views: 3,095 Hello:
I need help identifying some errors in a program that has to make a dice game for one person.
However, when I am trying to use if statements to explain the user when some moves are... |
Forum: C++ Jul 31st, 2005 |
| Replies: 10 Views: 2,105 You are rigth!
I tried to work with the switch statement without the two brakets and it did not work.
However, tell me when how do you refer to
this statement:
switch(sentence[i][0])
... |
Forum: C++ Jul 31st, 2005 |
| Replies: 10 Views: 2,105 Thank you very much!
I am going to try this!
It really is much shorter than my long nested if statements!
thanks! |
Forum: C++ Jul 31st, 2005 |
| Replies: 10 Views: 2,105 This is an array string problem where I have to ask for a sentence input that includes an integer (between 0 and 9), then the program has to change that integer to its name in words.
Like: This... |
Forum: C++ Jul 30th, 2005 |
| Replies: 16 Views: 3,624 Thanks God I found the error!
It was that in the second for loop inside the Sort function I was using the wrong variable to swap!
if (name[k]<=smallest) //Here instead of saying
... |
Forum: C++ Jul 30th, 2005 |
| Replies: 16 Views: 3,624 Nooooooooo!
I can't see where the error is!
I even have a similar program that sorts numbers. It has the same structure. The only difference is that this uses string arrays instead of int... |
Forum: C++ Jul 30th, 2005 |
| Replies: 16 Views: 3,624 This is the code I have for the names sorted, but it doesn't work completely.
I was using a similar where we had to sort words without using arrays!
I will try to debug it to see what is going... |
Forum: C++ Jul 30th, 2005 |
| Replies: 16 Views: 3,624 Thank you very much,
I see I was returning an empty statement after the else, but tell me. Is resize () a function that comes with a specific library?
As well, tell me when I want to enter for... |
Forum: C++ Jul 30th, 2005 |
| Replies: 16 Views: 3,624 Hello:
After talking to my teacher last thursday, he showed me a way to find if a word is a palindrome or not, however, I don't know why it doesn't work eventhough it looks as if it should work.... |
Forum: C++ Jul 28th, 2005 |
| Replies: 16 Views: 3,624 I am trying to work on this problem. I am assuming the word I am going to check is madam, but I am not sure how to compare them because my book says it is not possible to compare character arrays.
... |
Forum: C++ Jul 27th, 2005 |
| Replies: 16 Views: 3,624 Thank your very much for all your help, my program worked with the for loops. After getting the duplicates, I also had to put those integers in order, but I have done it already.
However, I have... |
Forum: C++ Jul 26th, 2005 |
| Replies: 16 Views: 3,624 Thank you for your help.
However, when I try to use functions to make a program, i do not know how to use arrays.
For example, now i am trying to make a program that reads a file that contains... |
Forum: C++ Jul 26th, 2005 |
| Replies: 16 Views: 3,624 I am taking a C++ class, but I am having a real trouble understanding arrays which confuse me completely.
This is the first time I take a programming class, so I really need help.
I do not really... |