c++ question

Discussion in 'Automated Trading' started by bidask, Feb 21, 2007.

  1. bidask


    how do you write a split function in c++? there is a split function in java and vb, but not in c++.
  2. bidask


    two other questions

    1) what if i want to split by line (separate each line) instead of by the delimiter within each line?
    2) what is the easiest way to put each split up item into an array?
  3. Craig66


  4. 1) fixed length or variable length? If the latter, how 'bout splitting on \n or similar for your desired OS.

    2) Use an STL container such as vector.

    Regarding string routines, wxwidgets, a cross platform GUI framework, has a nice string implementation that can be used outside of wxWidgets. You might give it a look. www.wxwidgets.org
  5. bidask


    do you guys know of a friendly c++ forum that has a nice mix of beginners and pros?
  6. andread


    When I was developing C++ I used to look at the moderated newsgroup. I think it was comp.lang.c++.moderated.
    There were some tough people there at the time, like Andrew Koenig and sometimes Stroustrup himself
  7. onelot


    yeah, the usenet forums are good. i like codeguru forums as well.
  8. Hi,

    If you want to learn C++ from scratch, this may not be a bad path:

    Get the book <i>C++ Primer Plus, 5th Edition</i>. It has very thorough explanations of basic topics. You may also want to get <i>C Primer Plus, 5th Edition</i>. Amazon sells them as a bundle. <i>C++ Primer</i> is good as well, but I find the writing style of the 'Plus' book to be easier to follow for the newbie.

    Also, check out Trolltech's Qt library. You will find a great wealth of functions to perform the splits and so on that you desire. Qt has amazing documentation and examples that, in and of itself, will provide an awesome programming education. Search the forums here to read about some others' experiences with Qt. There is seriously no easier way to get starting creating C++ GUI applications, and they can be compiled on various platforms with virtually the same code base. You can even integrate the open-source edition of Qt 4 with Visual Studio - check out http://qtnode.net for more info on that.

    Good luck,
    #10     Feb 22, 2007