Thread: Confused by CHAR

  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    932

    Confused by CHAR

    I saw in a code the datatype CHAR (with uppercase).

    I checked on MSDN and it says
    "A string function that converts an int ASCII code to a character."

    PHP Code:
    http://msdn.microsoft.com/en-us/library/aa258239(SQL.80).aspx 

    Code:
    CHAR* m_cCompleteBuffer = new CHAR [2096];
    So how can it be a data type and a function at the same time?
    Or is it the same as char (with lowercase)?
    Last edited by Ducky; 04-13-2009 at 08:53 AM.
    Using Windows 10 with Code Blocks and MingW.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    You are looking at a reference for SQL, not C++.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Dec 2007
    Posts
    932
    Yes, sorry.

    But i cant find anything on C++ either.
    Using Windows 10 with Code Blocks and MingW.

  4. #4
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  5. #5
    i've lost my mind
    Join Date
    Jun 2008
    Posts
    26
    You can't find anything about the data type 'char'?

    c++ char - Google Search
    Last edited by gltiich; 04-13-2009 at 09:25 AM.

  6. #6
    Registered User
    Join Date
    Dec 2007
    Posts
    932
    Thank you Vart, thats it.

    typedef char CHAR;

    So it looks like its the same as "char" only to use it in Windows Visual.
    Using Windows 10 with Code Blocks and MingW.

  7. #7
    Registered User
    Join Date
    Dec 2007
    Posts
    932
    To Gltiich.

    I wasn't talking about the data type 'char'.

    I know the data type 'char' all too well.
    Using Windows 10 with Code Blocks and MingW.

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, 02:06 PM
  2. Replies: 16
    Last Post: 10-29-2006, 05:04 AM
  3. newbie needs help with code
    By compudude86 in forum C Programming
    Replies: 6
    Last Post: 07-23-2006, 08:54 PM
  4. String sorthing, file opening and saving.
    By j0hnb in forum C Programming
    Replies: 9
    Last Post: 01-23-2003, 01:18 AM
  5. Extra printed stmts...why?
    By mangoz in forum C Programming
    Replies: 4
    Last Post: 12-19-2001, 07:56 AM