Thread: problem with a variable

  1. #16
    Registered User
    Join Date
    Jan 2005
    Posts
    7,366
    That is one person's suggestion. I suggest learning C++ strings before learning C style strings. Both will work, you don't need to have specific reasons, I just think it is better to use the string class unless you do.

    Learning the C++ way first instead of the C way is a common suggestion among C++ experts that I happen to agree with. Check out Stroustrup's paper on learning C++ as a new language for the opinion of a more well-known programmer than me.

  2. #17
    Registered User
    Join Date
    Sep 2005
    Location
    USA
    Posts
    69
    I actually am not coming from C. I have been programming C++ for about a month and a half now. I have never tried the string class as I have never seen the need to since there is char.
    Adam

  3. #18
    Registered User
    Join Date
    Jan 2005
    Posts
    7,366
    Most C++ beginners are taught C style strings and arrays in the beginning because most books, tutorials and teachers still do it that way. IMHO that is unfortunate, since I believe that teaching C++ style first is better, even if the details are glossed over at the beginning. Either way it is not going to make a major difference, but I do recommend you learn the string class if you have the chance.

    Even if you don't come from a C background, most C++ teaching tools do, which is not a good thing.

  4. #19
    Registered User
    Join Date
    Sep 2005
    Location
    USA
    Posts
    69
    Alright, I'll get on that.
    Thanks,
    Adam

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need some help...
    By darkconvoy in forum C Programming
    Replies: 32
    Last Post: 04-29-2008, 03:33 PM
  2. problem with variable passed as reference
    By crash88 in forum C Programming
    Replies: 1
    Last Post: 05-16-2006, 07:16 PM
  3. pointers
    By InvariantLoop in forum C Programming
    Replies: 13
    Last Post: 02-04-2005, 09:32 AM
  4. problem with the const variable
    By ssharish in forum C Programming
    Replies: 2
    Last Post: 01-28-2005, 09:53 AM
  5. Peculiar Problem with char variable in C Language
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 10-31-2001, 04:06 PM