Confused by CHAR

This is a discussion on Confused by CHAR within the C++ Programming forums, part of the General Programming Boards category; I saw in a code the datatype CHAR (with uppercase). I checked on MSDN and it says "A string function ...

  1. #1
    Registered User
    Join Date
    Dec 2007
    Location
    France
    Posts
    749

    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.
    Compiler MSVC++ 2010 with Code::Blocks.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,310
    You are looking at a reference for SQL, not C++.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Dec 2007
    Location
    France
    Posts
    749
    Yes, sorry.

    But i cant find anything on C++ either.
    Compiler MSVC++ 2010 with Code::Blocks.

  4. #4
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,452
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  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
    Location
    France
    Posts
    749
    Thank you Vart, thats it.

    typedef char CHAR;

    So it looks like its the same as "char" only to use it in Windows Visual.
    Compiler MSVC++ 2010 with Code::Blocks.

  7. #7
    Registered User
    Join Date
    Dec 2007
    Location
    France
    Posts
    749
    To Gltiich.

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

    I know the data type 'char' all too well.
    Compiler MSVC++ 2010 with Code::Blocks.

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. Replies: 16
    Last Post: 10-29-2006, 04: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, 12:18 AM
  5. Extra printed stmts...why?
    By mangoz in forum C Programming
    Replies: 4
    Last Post: 12-19-2001, 06:56 AM

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