Search:
Type: Posts; User: 2kaud
Search:
Search took 0.07 seconds.
-
February 2nd, 2013, 03:26 PM
A simple possible performance improvement - depending upon the compiler - is to look at the condition part of the for loops. In the for loop
for (trade2position = 1 + trade1position;...
-
February 1st, 2013, 11:38 AM
Pleased to be of help. Hope it all goes OK for you now. Welcome to the world of c++!
-
February 1st, 2013, 11:18 AM
It compiles without any warnings with my VS. Is the info generated correct and what you expected? How long is the program now taking to run?
-
February 1st, 2013, 10:49 AM
Can you post your code again please after all the changes. I'll crank it through my VC compiler and see what comes out.
-
February 1st, 2013, 10:16 AM
You would have
oneres.q = headerarray[q];
oneres.c = headerarray[c];
-
February 1st, 2013, 09:40 AM
Rather than having three different results vectors - one each for float, int and string - just have one vector and put the data direct into this rather than into the three different and later on...
-
February 1st, 2013, 08:59 AM
You mention that it is taking about 6 minutes to run. Roughly, do you know how much of this time is spent reading the csv file and building the arrays?
-
January 31st, 2013, 03:27 PM
I also note in your code that you are not pre-reserving space for the vectors. If a vector does not have enough memory to store an extra element then it will re-allocate memory and copy existing...
-
January 31st, 2013, 02:56 PM
In c++ with a multi condition statement, the conditions are only evaluated left to right as needed to correctly obtain the result. So in the case of &&, the left test if evaluted first. If it is...
-
January 31st, 2013, 12:20 PM
Perhaps the easiest way is to define a struct to contain the 3 numbers and the two strings and then declare a vector of this struct. The example below illustrates a possible method
#include...
|
Click Here to Expand Forum to Full Width
|