Search:

Type: Posts; User: gautamn

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    1,496

    STL list and referencing

    Hi,

    I have an STL list which holds references to a list of entities which are dynamic in my program. I am using an iterator to go through this list of items. I am trying to do the following which...
  2. My question was more towards this type of...

    My question was more towards this type of declaration.



    int func()
    {
    int a, b, c, d;

    // do something
    a = 5;
  3. So you can declare variables anywhere in a...

    So you can declare variables anywhere in a function ?
  4. Replies
    11
    Views
    1,566

    OpenGL/DirectX will work fine on Dev-c++. But I...

    OpenGL/DirectX will work fine on Dev-c++. But I suggest you learn C++ first before getting into OpenGL. The tutorials on this site are a good start :).
  5. In pure 'C' you have to declare variables in the...

    In pure 'C' you have to declare variables in the beginning of a function, but if you use using g++ on a unix system then you are actually calling the c++ compiler and not the C compiler and thus you...
  6. Replies
    3
    Views
    1,666

    As per your second method, Why would you want to...

    As per your second method, Why would you want to multiply a double by an int and save it to an int ? WOuldn't it be wiser to save it to a double ?
  7. Thread: String issues

    by gautamn
    Replies
    12
    Views
    1,669

    Re: ...

    Its defined in stddef.h and few other files. Its defined as



    typedef unsigned int size_t;
  8. Replies
    3
    Views
    1,092

    Hi, I think your powerfunc is totally wrong. I...

    Hi,

    I think your powerfunc is totally wrong. I suppose you want to do some 2^4 = 2 * 2 * 2 * 2.

    So you should be doing



    ULONG powerFunc(USHORT num, USHORT pow)
    {
  9. Replies
    6
    Views
    1,896

    Sorry to go off topic but how does if(u = 0, u...

    Sorry to go off topic but how does

    if(u = 0, u < 1) work? What does ',' do here ? Is it the same as
    if(u = 0 && u < 1) ?

    Also shouldn't it be u == 0 rather than u = 0 ?
  10. Thread: Linked list

    by gautamn
    Replies
    9
    Views
    3,379

    If I make it const Node *root, then I wouldn't be...

    If I make it const Node *root, then I wouldn't be able to do



    Node* node = root;


    Secondly I dont get it, how would I add data if I make a variable constant like

    const Node *node = root;...
  11. Thread: Linked list

    by gautamn
    Replies
    9
    Views
    3,379

    Ok, no problem, I will post it there, but I don't...

    Ok, no problem, I will post it there, but I don't see a lot of C++ in it except for new and cout.
  12. Thread: Linked list

    by gautamn
    Replies
    9
    Views
    3,379

    Linked list

    Hi,

    I was following the linked list tutorial on this site. I have the code here, but I am not sure if I am doing it right. Could someone tell me if I am on the right track, or is there a way I...
Results 1 to 12 of 13