-1

I'm doing some exercise where I need to use a boolean. However when I try to create one as Boolean the compiler does not accept it. What is the name of the boolean type in C++?

R. Martinho Fernandes
  • 228,013
  • 71
  • 433
  • 510
Cult
  • 9
  • 4
    1) C# is not C++. 2) How come you don't have a way to backup? Aren't you using version control? 3) You should learn *some* C++ (or whatever language) before writing it. I think this is too basic a question. I recommend grabbing a [good book](http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list). – R. Martinho Fernandes Aug 01 '11 at 01:32
  • Do you have [a good introductory C++ book](http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list)? – James McNellis Aug 01 '11 at 01:41
  • @Martinho Fernandes: You totally just destroyed his question (in a good way). – BoltClock Aug 01 '11 at 01:42
  • @BoltClock: what do you mean? Did I misunderstood something? Was the question about something else? – R. Martinho Fernandes Aug 01 '11 at 01:43
  • 1
    @Martinho Fernandes: Well, it started off as a convoluted life story + rant. My comment was just a joke. – BoltClock Aug 01 '11 at 01:46

1 Answers1

1

The boolean datatype in C++ is bool as in:

bool myBool = true;
Matt Bradley
  • 4,395
  • 1
  • 20
  • 13