Search:

Type: Posts; User: TheBigOnion

Search: Search took 0.00 seconds.

  1. Replies
    6
    Views
    6,210

    Then should it have been: string value(data,...

    Then should it have been:

    string value(data, data, size);?
  2. Replies
    6
    Views
    6,210

    Everyone yelled at me when I put that. They are...

    Everyone yelled at me when I put that. They are arguing over if I'm putting a pointer in the size section or a very large number.

    Why not just put

    string value(data, size)?

    Thanks.
  3. Replies
    6
    Views
    6,210

    pre-allocate memory for string

    Hello all,
    is there a way to pre-allocate memory for a string?

    so if I want to do something like this:


    char *data;
    string value;

    for (i=0; i<size; i++)
  4. Replies
    3
    Views
    1,026

    char causes segfaults more than strings?

    Hello all,

    I am very new to c++, (but have been a developer for 15 years) and have a question.

    I work with other c++ programmers. One loves chars the other says they could cause seg faults...
  5. Hello and thank you all. Why not use "using...

    Hello and thank you all.

    Why not use "using namespace std;"??? I've seen this before, but never known or heard why not to use it.

    Thanks,
    Michael
  6. error: ISO C++ forbids declaration of 'string' with no type

    Hello all,
    I am receiving this error when I try to compile.

    Tags.h


    #ifndef _TAGS_H
    #define _TAGS_H

    using namespace std;
Results 1 to 6 of 6