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

Search:

Type: Posts; User: 2kaud

Search: Search took 0.02 seconds.

  1. Replies
    22
    Views
    41,197

    Re: Error while using cin.get

    http://msdn.microsoft.com/en-us/library/ms123401.aspx
  2. Replies
    22
    Views
    41,197

    Re: Error while using cin.get

    You might need to insert


    #include <cstring>

    at the beginning of the code (golf.cpp if you are using multiple files - I just used one file for the example) if memset/strncpy is causing a...
  3. Replies
    22
    Views
    41,197

    Re: Error while using cin.get

    See the code in my post #11 which takes into account the 2 code points raised by Paul.
  4. Replies
    22
    Views
    41,197

    Re: Error while using cin.get

    Doing it using your design, one possible way would be



    #include <iostream>
    #include <cstring>
    using namespace std;

    const int Len = 40;
  5. Replies
    22
    Views
    41,197

    Re: Error while using cin.get

    A simple example of doing this using a class could be



    #include <iostream>
    #include <string>
    #include <map>
    using namespace std;

    typedef map<string, int> mapsi;
  6. Replies
    22
    Views
    41,197

    Re: Error while using cin.get

    What book are you using as you make reference to chap 9? If I was writing this program, I would be using a class with class functions to set/get golfers details.
  7. Replies
    22
    Views
    41,197

    Re: Error while using cin.get

    int setgolf(golf& g);

    This function declaration for setgolf takes one argument as a reference to a type called golf. However, when you call this function


    rint = setgolf(ptr_golf);

    you are...
Results 1 to 7 of 7


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This a Codeguru.com survey!


On-Demand Webinars (sponsored)