Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
3
Posts with Upvotes
3
Upvoting Members
3
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
Ranked #31.8K
Ranked #3K
~14.6K People Reached
Favorite Tags
c++ x 6

6 Posted Topics

Member Avatar for jnneson
Member Avatar for Thomas_36

I will try my best to keep this as simple as possible, hope I can be of help: > The problem I seem to be encountering is when I use new to declare an array. Allocating memory via `new` can throw a `std::bad_alloc` when there isn't enough memory to use. …

Member Avatar for Thomas_36
0
377
Member Avatar for shadab96

If you don't have a unit testing framework at hand, you could use some simple asserts for now, I guess. It might depend on what IDE you use too, because, for example, I have been using Visual Studio's unit testing 'framework' for some time now and it's pretty elegant. As …

Member Avatar for AssertNull
0
1K
Member Avatar for Nikhar

You're probably 8 years late, @pankaj_13. Even tho it's an old question, I'm going to suggest one way of displaying `\n` on the console, using C++11: Using raw strings (string literal officialy): #include <iostream> int main() { std::cout << R"(\n)"; return 0; } You simply type your string, enclose it …

Member Avatar for rubberman
0
2K
Member Avatar for can-mohan

Many warnings and mistakes in your code (not saying this to put you down or anything) so I will try to take it step by step. Firstly, you should *define* your classes in your header (.h) files. That is, move your two derived classes ('Staircase' and 'Localization') definitions into the …

Member Avatar for Coller
0
7K
Member Avatar for Tom_23

Firstly, why do you allocate a dynamic array with size 0? unsigned size = 0; string * ptr = new string[size]; Secondly, if you're going to use std::string as you are now, then you must also include `<string>`. Thirdly, your questions are hard to understand so the following code might …

Member Avatar for Coller
0
3K

The End.