Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~14.7K People Reached
Favorite Tags
c++ x 9

5 Posted Topics

Member Avatar for Thomas_36

I am trying to create a header file that contains several global variables. At the moment, the Globals header file looks like this: This is Globals.h #ifndef GLOBALS_INCLUDED #define GLOBALS_INCLUDED #include <string> std::string DRIVE="HELLO!!!!!"; #endif To go along with this, I have a cpp and h file the contain a …

0
143
Member Avatar for Thomas_36

OK, so I've learned through Google search that MinGW does not handle random number generation very well. Even when using a random generator seed based upon the time, it creates the same random numbers each time the program is run. This happens whether we used the old style rand, or …

Member Avatar for rubberman
0
1K
Member Avatar for Thomas_36

I am trying to learn error trapping using the C++ commands try, throw, and catch. The problem I seem to be encountering is when I use new to declare an array. When the program throws an exception, don't I need to delete those arrays to prevent a memory leak? I …

Member Avatar for Thomas_36
0
370
Member Avatar for John_159

On line 12, the code should be: while (getline(in, line)) { The way you have it now, the string line is never assigned a value. You might also want to intialize line, just to guard against the possibility that the random contents of line equals deleteline at startup.

Member Avatar for Nihar_2
0
12K
Member Avatar for Thomas_36

I have written the following function to accept a string from a csv text file that presumably contains a series of comma separated numbers. double comma_read(int &index, const string &input) // Reads a number from a comma delimited (csv) file // Returns first number after index-th comma // Then updates …

Member Avatar for rubberman
0
1K

The End.