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.15 seconds.

  1. 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) ?
  2. 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...
  3. 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";
  4. 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...
  5. Replies
    2
    Views
    183

    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);
  6. Replies
    2
    Views
    253

    Re: operator overloading (prefix ++)

    You have:



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



    It should be things &
  7. Replies
    2
    Views
    153

    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.
    }
  8. Replies
    18
    Views
    552

    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.
  9. Replies
    18
    Views
    552

    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...
  10. Replies
    18
    Views
    552

    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...
  11. Replies
    3
    Views
    242

    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 <...
  12. Replies
    1
    Views
    231

    Re: c++11 book

    You might look at:

    http://www.artima.com/shop/overview_of_the_new_cpp
  13. Replies
    4
    Views
    274

    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...
  14. Replies
    1
    Views
    237

    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:
  15. Replies
    18
    Views
    874

    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! -...
  16. Replies
    6
    Views
    490

    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...
  17. Replies
    11
    Views
    840

    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.
  18. Replies
    10
    Views
    574

    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...
  19. 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.
  20. Replies
    33
    Views
    1,338

    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...
  21. Replies
    9
    Views
    939

    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:
    ...
  22. Replies
    6
    Views
    876

    Re: OpenGL Component for VC++

    1) Yes, the two omissions that you mentioned should be there.

    2) In the PIXELFORMATDESCRIPTOR, this line looks strange:



    // PFD_DOUBLEBUFFER, // double buffered


    This not only takes away...
  23. Replies
    5
    Views
    230

    Re: Help with a project under linux

    Below is the output when I run configure. The codes that are "missing" in your output
    are located in /usr/bin on my system. Your system is not even seeing a C++ compiler.
  24. Replies
    5
    Views
    230

    Re: Help with a project under linux

    1) There is a file in the folder named, INSTALL. It gives the instructions:



    2) There are a lot of problems ...

    a) There are calls that look like this:


    Ccommon_logmsg("Connecting the...
  25. Re: A question regarding stl sort with list

    std::sort requires random access iterators. std::list only has bi-directional iterators.

    std::list has a member function to sort



    list<int> items;
    items.sort();
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