Forum: C++ Oct 25th, 2008 |
| Replies: 8 Views: 613 thanks to both of you for your fast response...i tried to use the getline function before (getline(cin, name);) but the same thing is happening. I don't know why. It doesn't even let me put anything... |
Forum: C++ Oct 24th, 2008 |
| Replies: 8 Views: 613 Can it be done?
cout<<"ENter name"<<endl;
cin>>name;
cout<<"Enter DOB"<<endl;
cin>>dob;
cout<<"Enter City of Birth"<<endl;
cin>>city;
when i try to enter "John Doe" as name the program... |
Forum: C++ Oct 23rd, 2008 |
| Replies: 3 Views: 357 Never mind fixed it...THanks guys |
Forum: C++ Oct 23rd, 2008 |
| Replies: 3 Views: 357 fixed the linking problem...still have the string compiler is complaining a lot >< |
Forum: C++ Oct 23rd, 2008 |
| Replies: 3 Views: 357 when i comment out the strings in the class it gives me a fatal link error. Fatal Link Error: Entry Must Be Defined... |
Forum: C++ Oct 23rd, 2008 |
| Replies: 3 Views: 357 hey guys im having a bit of trouble making an string accessor to a private member string variable that i have declared:
Class A{
public:
string getname() const;
private:
string name; |
Forum: C++ Sep 21st, 2008 |
| Replies: 18 Views: 945 Your a genius. Thank you so much :) Everything is working. Now to sort it lol Thanks again!!! |
Forum: C++ Sep 21st, 2008 |
| Replies: 18 Views: 945 I will delete that i just wanted to see if the array was passing correctly. Let me apply what you just said and ill get back to you. Thanks! |
Forum: C++ Sep 21st, 2008 |
| Replies: 18 Views: 945 hey thanks for the help. Got the program to run :)...now when i do a quick test to make sure i have the same array in the selectionsort function as the read function
void readInputFile(int... |
Forum: C++ Sep 21st, 2008 |
| Replies: 18 Views: 945 #include <iostream>
#include <fstream>
#include <string>
using namespace std;
void openInputFile(ifstream&infile);
void readInputFile(int,ifstream&infile); |
Forum: C++ Sep 21st, 2008 |
| Replies: 18 Views: 945 ok guys im having time passing an array by reference. I have it in one function and i need to get the array to the next function. I would have to pass it to main and then from main to the next... |
Forum: C++ Sep 20th, 2008 |
| Replies: 18 Views: 945 lol Thank you so much ArkM you openeded up my mind completely, i don't know why i was making an array of strings haha. I switched it to an integer array and it's working perfectly now, no vectors... |
Forum: C++ Sep 20th, 2008 |
| Replies: 18 Views: 945 ok i did this instead... and it's running but gives me an overstack/overflow error.
string numbers[100000];
for(int x=0; x<100000; x++)
{
infile>>numbers[x]; |
Forum: C++ Sep 20th, 2008 |
| Replies: 18 Views: 945 Sorry, I mean't to say char array. :) |
Forum: C++ Sep 20th, 2008 |
| Replies: 18 Views: 945 I am using Visual Studio 2008. It gives me an error when i make it a string array. Says it can't convert it from string to a char * so thats why i made it a char. But ya the char doesn't store all... |
Forum: C++ Sep 19th, 2008 |
| Replies: 18 Views: 945 Hello again guys,
I am trying to sort an array. First i must get the info from a txt file. The txt file has numbers and the only way i can put them into an array is to put them into a char... |
Forum: C++ Sep 9th, 2008 |
| Replies: 11 Views: 2,133 because if i dont declare it as string i can't use the switch(number.length()) |
Forum: C++ Sep 9th, 2008 |
| Replies: 11 Views: 2,133 This is what i have so far guys...
#include <iostream>
#include <string>
using namespace std;
void ones(string); |
Forum: C++ Sep 4th, 2008 |
| Replies: 11 Views: 2,133 yep thats what i was thinking raul. But i never heard of this "switch" can you explain it a little further? do i need to include any libraries? |
Forum: C++ Sep 3rd, 2008 |
| Replies: 11 Views: 2,133 hello guys i got a simple project but not that simple at the same time. lol The user needs to input a number such as : 512 and the code needs to output the number but in letters(five hundread and... |
Forum: C++ Aug 1st, 2008 |
| Replies: 14 Views: 1,594 ok so far i have done this to the program
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main(){ |
Forum: C++ Jul 24th, 2008 |
| Replies: 14 Views: 1,594 lol thanks Lerner fixed the problem...ill let you know how the program is coming. :D |
Forum: C++ Jul 24th, 2008 |
| Replies: 14 Views: 1,594 Thanks lerner..this is what i have whipped up so far...
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main(){ |
Forum: C++ Jul 23rd, 2008 |
| Replies: 14 Views: 1,594 I have a long way to go, but i eventually want to work my way to make a program that the user enters a Student, Student's Classs Number, classe's Name, student's ID, Credits, Grade.
And then... |
Forum: C++ Jul 22nd, 2008 |
| Replies: 14 Views: 1,594 ok i did what i wanted to do. I organized the GPA's which were in the txt file by a simple swap like code which i made. My new question is how can i do this but with an unkown number of student's and... |
Forum: C++ Jul 21st, 2008 |
| Replies: 14 Views: 1,594 thanks for the help dragon |
Forum: C++ Jul 21st, 2008 |
| Replies: 14 Views: 1,594 yep the txt file is arranged like that, a name then a space then the gpa(James 3.0) and thanks for the help Lerner. This is one of the things i have the most trouble with and something for some... |
Forum: C++ Jul 20th, 2008 |
| Replies: 14 Views: 1,594 Thanks dragon. I have them on the same line, my question is how can i let the program know when it hits the gpa? make a loop that scans the txt file that stops when it hits a number? |
Forum: C++ Jul 20th, 2008 |
| Replies: 14 Views: 1,594 hey guys just joined the forum and so far it looks very promising :D
got a quick question for everyone that can help, i am trying to organize a txt file to output the "gpa" from highest to lowest.... |