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

Search:

Type: Posts; User: Philip Nicoletti

Page 1 of 80 1 2 3 4

Search: Search took 0.14 seconds.

  1. Replies
    2
    Views
    427

    Re: How to initialize QMap

    1) What version of Qt are you using? constructor using am initializer list started with 5.1

    2) what operating system ? If Linux, and using g++, you need instruct g++ to use C++11
    Add to the pro...
  2. Replies
    1
    Views
    325

    Re: Two questions on C++ programming

    You can see an example of setting up a MDI type of application:

    1) open QtCreator
    2) On the left pan click the "welcome" icon
    3) then on the top click on "Examples"
    4) Scroll down to "MDI...
  3. Replies
    16
    Views
    887

    Re: Piped text to binary

    1) You are only allocating 1 space in buffer, instead of 5

    2) In while loops, checking eof() almost always leads to
    outputting extra values, since eof() does not become true
    until an...
  4. Re: Why Netbeans make use of Posix path style?

    Have you verified the location of make.exe ?

    On my system, it is located at:

    /C/MinGW/msys/1.0/bin

    not

    /C/MinGW/mingw32/bin
  5. Re: String loses its value..for no reason, apparently

    You have:



    char kod[7];


    Is 7 large enough to hold the result (with the trailing NULL) ?
  6. Re: Debug Assertion Failed! due to the use of ifstream

    Where does the error occur ? The only vector you have is the variable: mat
    And you only do a push_back() with that variable. It is not used anywhere else.
    Does the "Swap" constructor end up using...
  7. Re: Debug Assertion Failed! due to the use of ifstream

    1) You have :


    const char* file = "C:\WAR ROOM\FINANCE\Cpp\Test\Test\swapData.txt";

    It should be


    const char* file = "C:\\WAR ROOM\\FINANCE\\Cpp\\Test\\Test\\swapData.txt";
  8. Re: OpenGL - 2D Movement with respondtokeypress

    FYI: Instead of implementing a callback for glutKeyboardFunc, you could implement
    a callback for glutSpecialFunc and catch the keys: GLUT_KEY_UP , GLUT_KEY_DOWN,
    GLUT_KEY_RIGHT , and...
  9. Replies
    2
    Views
    293

    Re: fstream adds extra byte?

    Visual C++ does that in text mode. Open the file in binary mode:



    MyImage.open (L"messup.txt",ios::binary);
  10. Replies
    2
    Views
    362

    Re: operator overloading (prefix ++)

    You have:



    thing & operator ++() //******** here *******



    It should be things &
  11. Replies
    2
    Views
    646

    Re: Help with Vector input/couting

    You have:



    cin >> the_word; //when the desired words are entered, the if loop will catch those and enter them into the vector
    while (cin >> the_word)
    {
    // etc.
    }
  12. Replies
    18
    Views
    1,139

    Re: Problems with iterators

    I don't see a reason why you can not make it a stand-alone function
    or a static member function.
  13. Replies
    18
    Views
    1,139

    Re: Problems with iterators

    Generally, the functor (hasCollided in your code), is a stand-alone function, not a member
    function (or it is a static member function). There is a syntax to use if it is a member
    function (which...
  14. Replies
    18
    Views
    1,139

    Re: Problems with iterators

    1) Some notes:



    sprites.erase(remove_if(sprites.begin(), sprites.end(), hasCollided), sprites.end());


    where sprites is a std::vector<Sprite*>

    I assume that the elements of vector were...
  15. Replies
    3
    Views
    464

    Re: Program crashing

    1) I didn't read thru all of the first post, but if operator() is used as a sort criteria, it should be:



    bool operator()(const SDPair &lhs, const SDPair &rhs) const
    {
    if ( lhs.second <...
  16. Replies
    1
    Views
    327

    Re: c++11 book

    You might look at:

    http://www.artima.com/shop/overview_of_the_new_cpp
  17. Replies
    4
    Views
    393

    Re: problem with function

    Look at the line:



    cout << "The Lucky " << print() << endl; //This line


    1) "The Lucky" will be printed before the RETURN VALUE of print()

    2) There is no gaurantee that print() will...
  18. Replies
    1
    Views
    328

    Re: C++ Tiff file reader problem

    You have:


    TIFF_HEADER *header;


    But header is never set to point to a valid TIFF_HEADER object (such as using new).

    You don't need to use a pointer at all for this:
  19. Replies
    18
    Views
    1,360

    Re: Large Factorials

    Asumming I have not made a calculation mistake, I don't think
    you even need to calculate a factorial.

    I would start processing from the right (ignoring the constant).

    1) consider term k! -...
  20. Replies
    6
    Views
    1,032

    Re: string comparing problem

    Summary of what you have ...



    char * string_a = new char[loaded_values.size() + 1];
    char * string_b = new char[loaded_values.size() + 1];

    if(string_a==string_b)

    You should not compare...
  21. Replies
    11
    Views
    1,395

    Re: MFC Tab Control Problem

    Also, why are you showing both dialogs ? Should only one be visible (SW_SHOW) ?
    And then when the tab selection changes ... get the current tab, show/hide the appropriate
    dialogs.
  22. Replies
    10
    Views
    956

    Re: Returning struct from function

    If the user doesn't supply one, doesn't the compiler automatically
    generate a copy assignment operator that does a member by member copy ?
    (Unless there is a user declared move constructor and/or...
  23. Re: If else statement displaying both options.

    What is the purpose of the following statement ?



    cin.ignore();


    What does it do ? And how does it effect the input stream ? Hint: output the value of "x"
    after you read it in.
  24. Replies
    33
    Views
    3,550

    Re: Save/load functions not working

    I don't see where a pointer is being saved to file.

    If the Character class is POD, then the posted code is correct.
    If the Character class contains non-POD variables (such as std::string)
    or...
  25. Replies
    9
    Views
    3,589

    Re: SetCurrentDirectory problem ..

    OFN_NOCHANGEDIR does not effect GetOpenFileName.

    In some cases, setting the CFileDialog's m_ofn.lpstrInitialDir works.

    You might be able to use a callback function similar to:
    ...
Results 1 to 25 of 2000
Page 1 of 80 1 2 3 4


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center