This question already has answers here:
What does the caret (‘^’) mean in C++/CLI?
(8 answers)
Closed 7 years ago.
I read an article about C++ language. There is lines using "^", not XOR.
Sample code is like:
array<String^>^args = System::Environment::GetCommandLineArgs();
The symbol ^ is used for managed pointers.
Read http://msdn.microsoft.com/en-us/library/cxx6f46y.aspx , for more information about them.
They are from C++/CLI though and not C++.
Related
This question already has answers here:
What's the difference between parentheses and braces in c++ when constructing objects
(1 answer)
what is aggregate initialization
(2 answers)
Closed 9 months ago.
From boost libraries, I found this example
I marked a line with a red arrow, indicating the notation that is confusing me.
Is this special to boost or is this some sort of anonymous function syntax? I wasn't aware that C++ or C had such notation. I only kind of recognize it from python and java experience.
This question already has answers here:
Integer literal with single quotes? [duplicate]
(2 answers)
Is there a way to write a large number in C++ source code with spaces to make it more readable? [duplicate]
(6 answers)
Closed 2 years ago.
I recently came across the following C++ code snippet:
int Mod = 998'244'353;
I was intrigued by the use of single quotes in this number.
Could someone elaborate on what this gets interpreted as and why is it accepted?
Also has this formatting always been there in c++?
This question already has answers here:
Using :: (scope resolution operator) in C++
(5 answers)
When do I use a dot, arrow, or double colon to refer to members of a class in C++?
(4 answers)
Closed 2 years ago.
I've started learning Classes in C++ and have come across this :: operator. I have no idea what it means and how/when to use it. It was in every piece of C++ code I'd ever seen. The tutorial I watched didn't explain what it is. Could anyone explain?
This question already has answers here:
How does the Comma Operator work
(9 answers)
Closed 4 years ago.
I was practicing practicing some programming and by mistake wrote the following line of code :
int a,b;
cin>>a,b;
Can anybody explain what the comma does here and why doesn't the compiler show any error.
It means that the whole expression has the value b.
But because b is not initialised the behaviour of your code is undefined!
Modern compilers can warm you of this.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
What algorithm gives suggestions in a spell checker?
What algorithm should be used in a C++ program whose aim is to read from a text file and give suggestions for the wrong spelled words ?
Use the Levenshtein distance:
http://thetechnofreak.com/technofreak/levenshtein-distance-implementation-c/
http://murilo.wordpress.com/2011/02/01/fast-and-easy-levenshtein-distance-using-a-trie-in-c/