No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
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 … |
|
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 … |
|
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 … |
|
Re:
very new to c++ . have an assignment when am to input some information about an item and write to a file . Have succesfully done that but now i i dont know how to delete a line of entry from the text file and save it . look at … |
|
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 … |