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

Search:

Type: Posts; User: heidiK

Page 1 of 5 1 2 3 4

Search: Search took 0.03 seconds.

  1. Re: summation of no.s in current iterator and previous iterator

    THANKS for your HELP
  2. Re: summation of no.s in current iterator and previous iterator

    One more thing if you don't mind and have time. I am reading the values form a file and all these dates and partial sums are stored against different items. Name of the first item is A and the other...
  3. Re: summation of no.s in current iterator and previous iterator

    Thanks :)
  4. Re: summation of no.s in current iterator and previous iterator

    Many Thanks Philip. Some values from the result are missing when the second solution (provided by yourself) is run.
  5. Re: summation of no.s in current iterator and previous iterator

    Thank you Philip for explaining to me through the code above. I also want to print the first most value. i-e 110
  6. Re: summation of no.s in current iterator and previous iterator

    Thanks all

    Let me try it with the map solution
  7. Re: summation of no.s in current iterator and previous iterator

    In this example the value in the string stored in the current iterator is 170 and the value in the string stored in the previous iterator is 110, the sum of the two values is 280 (170+110), I want to...
  8. summation of no.s in current iterator and previous iterator

    Hello all

    Below is the sample of the code I need help with

    int summation = 0;

    for (it= s.begin(); it!= s.end(); ++it)
    {
    summation += std::atoi( ((*it).substr( 8 )).c_str() );
    }
  9. Replies
    2
    Views
    2,054

    Re: tinyxml find End of Parent Node

    D_Drmmr

    Suppose that's one of the blocks of an xml file



    <MyApp app="heidik">
    <!-- Settings for MyApp -->
    <Messages>
    <Welcome>Welcome to MyApp</Welcome>
  10. Replies
    2
    Views
    2,054

    tinyxml find End of Parent Node

    Hello everyone

    Could anyone please help me how do I find the end of a parent xml node? E-g </MyApp> in the example below is the end of the parent node <MyApp> and e-g print a msg each time after...
  11. Replies
    10
    Views
    8,740

    Re: multimap: find duplicates

    Thank you SkyNetTo :)
  12. Replies
    13
    Views
    952

    Re: compile time error

    The actual code is tooooooooooo long that's why I am just posting the segments relevant to that method which is giving me an error



    --------------
    // header file
    --------------

    class...
  13. Replies
    13
    Views
    952

    Re: compile time error

    NOOO why would I lie :P, dont be angry. I have done exactly the same thing and the "static linkage" error has gone but now the new error is something related to linux I think which I copied above...
  14. Replies
    13
    Views
    952

    Re: compile time error

    In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../include/c++/4.4.4/algorithm:62,
    from class1.cpp:6:...
  15. Replies
    13
    Views
    952

    Re: compile time error

    I have already tried this as well. I removed the key word static from the definition and now some linux errors I think and I am not familiar with linux much
  16. Replies
    13
    Views
    952

    Re: compile time error

    error: cannot declare member function ‘static bool class1::compr(const class1::structT1&, const class1::structT1&)’ to have static linkage
  17. Replies
    13
    Views
    952

    Re: compile time error

    it is the .h declaration


    static bool compr(const structT1& t1, const structT1& t2);

    and .cpp is



    static bool class1::compr(const structT1& t1, const structT1& t2)
  18. Replies
    13
    Views
    952

    Re: compile time error

    an error again



    error: cannot declare member function ‘static bool removeDupEntries::compr(const removeDupEntries::ordRecvblock&, const removeDupEntries::ordRecvblock&)’ to have static linkage
  19. Replies
    13
    Views
    952

    compile time error

    I have a function called compr



    bool class1::compr(const structT1& t1, const structT1& t2)
    {
    return t1.dateTime > t2.dateTime;
    }
  20. Replies
    13
    Views
    1,397

    Re: sorting on the basis of datetime

    Oh thanks you sooo much Philip :)
  21. Replies
    13
    Views
    1,397

    Re: sorting on the basis of datetime

    Do I necessarily have to convert the date/time part of the string to proper date time (time_t&)? because the simple string comparison is working and is picking up the correct time
  22. Replies
    13
    Views
    1,397

    Re: sorting on the basis of datetime

    I have deleted the vector in my code. Sorry I missed it here :P



    if (pos1 != string::npos)
    {
    istringstream ss(line);
    getline(ss,ordb.lineID,',');
    getline(ss,ordb.dateTime,',');...
  23. Replies
    13
    Views
    1,397

    Re: sorting on the basis of datetime

    Thanks Philips I have been able to do it :). Let me test it with different and many lines
  24. Replies
    13
    Views
    1,397

    Re: sorting on the basis of datetime

    yes that's exactly the line and the code I have so far for this task is




    struct ordRecvblock
    {
    std::string lineID; // 0:1:OrderReceive
    std::string dateTime; // 01.07.2010...
  25. Replies
    13
    Views
    1,397

    sorting on the basis of datetime

    I have a file that has duplicates and I have to select the one with the earliest time


    0:1:OrderReceive,01.07.2010 10:38:09.984,0G508Q090,0000F9F5,A,15,0,15,0,115
    0:1:OrderReceive,01.07.2010...
Results 1 to 25 of 106
Page 1 of 5 1 2 3 4





Click Here to Expand Forum to Full Width

Featured