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

Search:

Type: Posts; User: crei

Search: Search took 0.02 seconds.

  1. Replies
    2
    Views
    1,595

    Re: Recursive imports problem

    You can use forward declarations and hide the object implementation behind a pointer.

    So A.h would look like



    class B;
    class A{
    public:
    A(){}
  2. Thread: Is this possible?

    by crei
    Replies
    6
    Views
    548

    Re: Is this possible?

    int a=5;
    if (a==7||6||5||4||3||2)


    is not going to do what you want it to (the condition will always be true). Instead do



    if( a >= 2 && a <=7 )
    // Do something
  3. Re: Good C++ Linux/Unix Terminal in Windows XP Professional

    Use cygwin. It contains most of the tools that you accustom to (vi, emacs, gcc, gdb, etc). It is basically a linux like environment that runs on a windows platform.

    I think that this is...
  4. Replies
    4
    Views
    528

    Re: numeric_limits question

    Just to answer my own question just incase anyone else faces this problem:

    In gcc there are INFINITY and NAN defines in math.h. However you need to compile the source with gcc -std::c99. ...
  5. Replies
    4
    Views
    528

    Re: numeric_limits question

    But this could vary from compiler to compiler. I need a function or macro. Also what about Nan?
  6. Replies
    4
    Views
    528

    numeric_limits question

    I was wondering what the equivalent to


    numeric_limits<double>::infinity()
    numeric_limits<double>::quiet_NaN()
    numeric_limits<double>::signaling_NaN()

    would be in C.

    I have tried
  7. Replies
    2
    Views
    710

    Re: getline() and cin conflicts

    Reading numbers in directly with cin is tricky. Just take in the ID as a string, then you can use the atoi function in cstdlib so you don't have to write the strToInt function. Here is the fix:

    ...
  8. Replies
    3
    Views
    1,109

    Re: How to encrypt file text file contents

    Iterate over the structure and output the contents. There are plently of examples of how to do this. In your case,



    ostringstream ost;
    ........
    std::vector<Person>::iterator iter =...
  9. Thread: String to Int

    by crei
    Replies
    3
    Views
    615

    Re: String to Int

    Sounds like you need to do some redesign. If you are writting these questions to disk you should format in someway, such as in XML format. For instance,



    <Trivia>
    <id>1</id>
    ...
  10. Replies
    3
    Views
    1,109

    Re: How to encrypt file text file contents

    Sounds to me like you should have a person class or struct that contains name and age members. You can then insert the objects into a vector if you like.


    typedef struct Person {
    std::string...
  11. Replies
    5
    Views
    805

    Re: Circular linked queue

    From what I can see I don't think that you need a queue class because the STL already contains collections which are prefect for RR Scheduling. If on the other hand you do need a class for queue,...
  12. Replies
    6
    Views
    1,048

    Re: Constructor to allow interactive entry

    Init using the subclass. See main().




    int main() {
    Item *sofa = new Sofa();
    sofa->printDetails();
    delete sofa;
    return 0;
  13. Replies
    9
    Views
    644

    Re: Loop To Create Variables

    You should probably create a class that defines a category, then create and add them to some sort of collection. Here is an example using a vector. It is trivial to have main() create the Category...
Results 1 to 13 of 13


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