Would someone please explain this:  "C++, pronounced "C plus plus," is a programming language that was built off the C language".  What is meaning of "off" in this statement?
52625
What is the meaning of "build off of"? I Googled it, but can't find any definition!  I encountered it in the sentence in a technical book. The sentence is:     For the application we will build, the todos example is the closest   fit, so we'll go ahead and build off of that example.   There is a link related to it I found by Google, But it didn't give the definition!
69127
I'm looking for detailed information regarding the size of basic C++ types. I know that it depends on the architecture (16 bits, 32 bits, 64 bits) and the compiler.  But are there any standards for C++?  I'm using Visual Studio 2008 on a 32-bit architecture. Here is what I get:  char  : 1 byte short : 2 bytes int   : 4 bytes long  : 4 bytes float : 4 bytes double: 8 bytes   I tried to find, without much success, reliable information stating the sizes of char, short, int, long, double, float (and other types I didn't think of) under different architectures and compilers.
84232
Alright, I think we all agree that what happens with the following code is undefined, depending on what is passed,  void deleteForMe(int* pointer) {      delete[] pointer; }   The pointer could be all sorts of different things, and so performing an unconditional delete[] on it is undefined. However, let's assume that we are indeed passing an array pointer,  int main() {      int* arr = new int[5];      deleteForMe(arr);      return 0; }   My question is, in this case where the pointer is an array, who is it that knows this? I mean, from the language/compiler's point of view, it has no idea whether or not arr is an array pointer versus a pointer to a single int. Heck, it doesn't even know whether arr was dynamically created. Yet, if I do the following instead,  int main() {      int* num = new int(1);      deleteForMe(num);      return 0; }   The OS is smart enough to only delete one int and not go on some type of 'killing spree' by deleting the rest of the memory beyond that point (contrast that with strlen and a non-\0-terminated string -- it will keep going until it hits 0).  So whose job is it to remember these things? Does the OS keep some type of record in the background? (I mean, I realise that I started this post by saying that what happens is undefined, but the fact is, the 'killing spree' scenario doesn't happen, so therefore in the practical world someone is remembering.)
36363
Session transcript: &gt; type lookma.c int main() {   printf(&quot;%s&quot;, &quot;no stdio.h&quot;); }  &gt; cl lookma.c Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86 Copyright (C) Microsoft Corporation.  All rights reserved.  lookma.c Microsoft (R) Incremental Linker Version 8.00.50727.762 Copyright (C) Microsoft Corporation.  All rights reserved.  /out:lookma.exe lookma.obj  &gt; lookma no stdio.h
26743
How can I format my output in C++? In other words, what is the C++ equivalent to the use of printf like this:  printf("%05d", zipCode);   I know I could just use printf in C++, but I would prefer the output operator &lt;&lt;.  Would you just use the following?  std::cout &lt;&lt; "ZIP code: " &lt;&lt; sprintf("%05d", zipCode) &lt;&lt; std::endl;
46218
What does this mean?      I am sure this would not have been possible had I remained a typical Anglophone North American.   I have never heard that before and I really find it strange.  I deduce that it means      I am sure this would not have been possible if I kept remaining Anglophone North American.   But I might be wrong in this.
121889
I saw the "new type" BOOL (YES, NO).  I read that this type is almost like a char.  For testing I did :  NSLog(@"Size of BOOL %d", sizeof(BOOL)); NSLog(@"Size of bool %d", sizeof(bool));   Good to see that both logs display "1" (sometimes in C++ bool is an int and its sizeof is 4)  So I was just wondering if there were some issues with the bool type or something ?  Can I just use bool (that seems to work) without losing speed?
99037
I see this from time to time and want to know what it is. I did try google, but its filtering out the characters from the search. I have a few books that don't reference it either.   FWIW, I remember in pascal that is was the assignment operator.   Can anybody point me to the MSDN or similar page?
91899
So I'm learning C++.  I've got my "C++ Programming Language" and "Effective C++" out and I'm running through Project Euler.  Problem 1...dunzo.  Problem 2...not so much.  I'm working in VS2008 on a Win32 Console App.  Whats the Sum of all even terms of the Fibonacci Sequence under 4 million?    It wasn't working so I cut down to a test case of 100...  Here's what I wrote...  // Problem2.cpp : Defines the entry point for the console application. //  #include "stdafx.h" using namespace std;  int _tmain(int argc, _TCHAR* argv[]) {     cout &lt;&lt; "Project Euler Problem 2:\n\n";     cout &lt;&lt; "Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:\n\n";     cout &lt;&lt; "1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...\n\n";     cout &lt;&lt; "Find the sum of all the even-valued terms in the sequence which do not exceed four million.\n\n";     cout &lt;&lt; "Answer:  " &lt;&lt; Solve(); }  double Solve() {     int FibIndex = 0;     double result = 0.0;     double currentFib = GenerateNthFibonacciNumber(FibIndex);     while (currentFib &lt; 100.0){         cout &lt;&lt; currentFib &lt;&lt; " " &lt;&lt; (int)currentFib &lt;&lt; " " &lt;&lt; (int)currentFib % 2 &lt;&lt; "\n";         if ((int)currentFib % 2 == 0){             result += currentFib;             cout&lt;&lt;(int)currentFib;         }         currentFib = GenerateNthFibonacciNumber(++FibIndex);     }     return result; }  double GenerateNthFibonacciNumber(const int n){     //This generates the nth Fibonacci Number using Binet's Formula     const double PHI = (1.0 + sqrt(5.0)) / 2.0;     return ((pow(PHI,n)-pow(-1.0/PHI,n)) / sqrt(5.0)); }   And here's the output...     Project Euler Problem 2:      Each new term in the Fibonacci   sequence is generated by adding the   previous two terms. By starting with 1   and 2, the first 10 terms will be:      1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...      Find the sum of all the even-valued   terms in the sequence which do not   exceed four million.      0 0 0  1 1 1  1 1 1  2 2   0 3 3 1 5 5 1 8 8 0 13   13 1 21 21 1 34 34 0 55 54   0 89 89 1 Answer:  99   So I have three columns of debug code...the number returned from the generate function, (int)generatedNumber, and (int)generatedNumber  % 2  So on the 11th term we have  55,54,0  Why does (int)55 = 54?
91230
What does the following code do in C/C++?  if (blah(), 5) {     //do something }
81821
In the  library, they are overloading the () operator.  Is this a convention in C++? For callbacks, etc.?  I have seen this in code of a co-worker (who happens to be a big Boost fan). Of all the Boost goodness out there, this has only led to confusion for me.  Any insight as to the reason for this overload?
37291
Does C++ support '' blocks?  What is the ?  What is the difference between C++'s RAII idiom and ?
110922
Or is it now the other way around?  From what I've heard there are some areas in which C# proves to be faster than C++, but I've never had the guts to test it by myself.  Thought any of you could explain these differences in detail or point me to the right place for information on this.
103430
My personal style with C++ has always to put class declarations in an include file, and definitions in a .cpp file, very much like stipulated in . Admittedly, part of the reason I like this style probably has to do with all the years I spent coding Modula-2 and Ada, both of which have a similar scheme with specification files and body files. I have a coworker, much more knowledgeable in C++ than I, who is insisting that all C++ declarations should, where possible, include the definitions right there in the header file. He's not saying this is a valid alternate style, or even a slightly better style, but rather this is the new universally-accepted style that everyone is now using for C++. I'm not as limber as I used to be, so I'm not really anxious to scrabble up onto this bandwagon of his until I see a few more people up there with him. So how common is this idiom really? Just to give some structure to the answers: Is it now The Way™, very common, somewhat common, uncommon, or bug-out crazy?
2950
I've been attempting to learn C in my spare time, and other languages (C#, Java, etc.) have the same concept (and often the same operators) ...   What I'm wondering is, at a core level, what does bit-shifting (&lt;&lt;, &gt;&gt;, &gt;&gt;&gt;) do, what problems can it help solve, and what gotchas lurk around the bend? In other words, an absolute beginner's guide to bit shifting in all its goodness.
78505
I'm asking with regards to c#, but I assume its the same in most other languages.  Does anyone have a good definition of expressions and statements and what the differences are?
97679
I am curious if anyone have used UnderC, Cint, Cling, Ch, or any other C++ interpreter and could share their experience.