CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: 2kaud

Search: Search took 0.07 seconds.

  1. Re: Getting data in to C++ from excel, any help would be greatly appreciated

    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;...
  2. Re: Getting data in to C++ from excel, any help would be greatly appreciated

    Pleased to be of help. Hope it all goes OK for you now. Welcome to the world of c++!
  3. Re: Getting data in to C++ from excel, any help would be greatly appreciated

    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?
  4. Re: Getting data in to C++ from excel, any help would be greatly appreciated

    Can you post your code again please after all the changes. I'll crank it through my VC compiler and see what comes out.
  5. Re: Getting data in to C++ from excel, any help would be greatly appreciated

    You would have

    oneres.q = headerarray[q];
    oneres.c = headerarray[c];
  6. Re: Getting data in to C++ from excel, any help would be greatly appreciated

    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...
  7. Re: Getting data in to C++ from excel, any help would be greatly appreciated

    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?
  8. Re: Getting data in to C++ from excel, any help would be greatly appreciated

    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...
  9. Re: Getting data in to C++ from excel, any help would be greatly appreciated

    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...
  10. Re: Getting data in to C++ from excel, any help would be greatly appreciated

    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...
Results 1 to 10 of 10





Click Here to Expand Forum to Full Width

Featured