Search Results

Showing results 1 to 7 of 7
Search took 0.01 seconds.
Search: Posts Made By: rockthrower
Forum: C++ May 16th, 2007
Replies: 13
Views: 14,396
Posted By rockthrower
Thanks for the tips!

I am needing to use a pointer to an array of objects in addition to dynamically allocating memory for the array of objects. For some reason, I keep getting error messages:
...
Forum: C++ May 15th, 2007
Replies: 13
Views: 14,396
Posted By rockthrower
OK, so this program that I am writing basically reads data from a text file then stores the data into an array of objects - one object per line. It then makes the necessary calculations and outputs...
Forum: C++ May 13th, 2007
Replies: 13
Views: 14,396
Posted By rockthrower
I realized that it was not looping because i was not taking in the very last character in the line. I initialized a new variable to take in the last character and although it loops now, it still does...
Forum: C++ May 13th, 2007
Replies: 13
Views: 14,396
Posted By rockthrower
I am only able to copy in the first line of data from the text file but not the rest. For some reason, it is not looping until empFile && empNum are less than MAX_EMP:



const int MAX_EMP =...
Forum: C++ May 13th, 2007
Replies: 13
Views: 14,396
Posted By rockthrower
I got around the issue of copying the string into an array using the following code:
// tempName is a string, name is an array of characters
tempName.copy(name, 21, 0);
Forum: C++ May 13th, 2007
Replies: 13
Views: 14,396
Posted By rockthrower
Thanks for the response.

The only problem is that I need to ultimately store the name, both first and last name into a character array which is apart of a class object. I tried strcpy(name,...
Forum: C++ May 13th, 2007
Replies: 13
Views: 14,396
Posted By rockthrower
Hello,

I am trying to read data from a text file in the following format:
05 mike smith 30.00 2 1

so the format is: int, character[21] = max size of array, double, int, int

I am trying...
Showing results 1 to 7 of 7

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC