how to make a if a char equals something

This is a discussion on how to make a if a char equals something within the C++ Programming forums, part of the General Programming Boards category; It may be C++ but it never hurts to know about C-Style strings and his question was on C-style strings. ...

  1. #16
    Registered User
    Join Date
    Aug 2003
    Posts
    1,200
    It may be C++ but it never hurts to know about C-Style strings and his question was on C-style strings.

    I agree C++ strings are what should be used but that doesnt migate the fact that C-style strings are still good to learn and most books teach them before C++ strings.

  2. #17
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,538
    I sincerely disagree. A C++ dev should know C++ strings and largely ignore C-style strings. Most are better of not knowing them.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #18
    Registered User
    Join Date
    Aug 2003
    Posts
    1,200
    Well i guess we will just have to settle with agreeing that we disagree

  4. #19
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,538
    And btw, I don't like the approach of learning C-stuff before C++ stuff. I believe all those thousands of books out there use the wrong approach.
    The one book I do like is Accelerated C++. It focuses on writing C++ applications without forcing the user to learn C stuff before. It only teaches them (and a narrow subset) in a practical manner to implement higher C++ functionality and encapsulation.
    Gets you started on C++ right away.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Conversion Char To Char * Problem
    By ltanusaputra in forum Windows Programming
    Replies: 3
    Last Post: 03-01-2008, 01:06 PM
  2. String sorthing, file opening and saving.
    By j0hnb in forum C Programming
    Replies: 9
    Last Post: 01-23-2003, 12:18 AM
  3. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 04:10 PM
  4. Strings are V important...
    By NANO in forum C++ Programming
    Replies: 15
    Last Post: 04-14-2002, 11:57 AM
  5. errors in class(urgent )
    By ayesha in forum C++ Programming
    Replies: 1
    Last Post: 11-10-2001, 09:14 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21