Posts
 
Reputation
Joined
Last Seen
Ranked #103
Strength to Increase Rep
+15
Strength to Decrease Rep
-3
95% Quality Score
Upvotes Received
399
Posts with Upvotes
343
Upvoting Members
225
Downvotes Received
17
Posts with Downvotes
16
Downvoting Members
15
92 Commented Posts
~966.01K People Reached
About Me

I'm 29 and currently learning c++. I like doing mathematical computations and working on encryption methods. Now I am currently learning how to use Whittmann Robots.

Interests
C++, math, football (American), music (not country), playing with my god kids
PC Specs
Intel i5-2500k 3.3 Ghz processor, 16 GB DDR3 1600 ram, 1 GB Video PCIx2.0 x16, 2TB HD, running Windows…
Member Avatar for rajesanthu

@takuya17 - Please don't resurrect dead threads with something completely unrelated. If you want to contract a coding job you need to do so under the Jobs and resumes section in business exchange.

Member Avatar for Youssef Faisal
-4
43K
Member Avatar for rodeostar04
Member Avatar for N@sir
0
5K
Member Avatar for ellaine101591

in your if statement when you are outputting your picture of the hanging man you are using a \. with c++ that is an escape character and is used for special purposes line \n for newline. in order to output a single \ to the screen you would need [icode] …

Member Avatar for MUGDHA_2
0
3K
Member Avatar for casey.li.146

Can you paste about 10 lines or so from the file into here. Does every column value have a "," after it or does each line end with a newline? Generally with a CSV file if there is an empty column it is represented as ",," but I don't see …

Member Avatar for ming_1
0
6K
Member Avatar for Kaushalya15
Member Avatar for Aild

Right off the bat from your code you need to put `int GetanInt();` before your main function so that the compiler knows there is a function called GetanInt() somewhere. Secondly you have a semi colon after your function name on line 17. There could be more but thats right from …

Member Avatar for Andy_20
0
13K
Member Avatar for Bob

using standard code you could do the following char choice; do { // your code goes here std::cout << "Do you want to go again (y/n): "; std::cin.get(choice); } while (::tolower(choice) == 'y');

Member Avatar for JamesCherrill
3
52K
Member Avatar for Sarlacc

You might be able to use a [`std::mutex`](http://en.cppreference.com/w/cpp/thread/mutex) for this. You might also want to rethink your data structure. You could have all of the thread writing to a [thread safe queue](https://www.justsoftwaresolutions.co.uk/threading/implementing-a-thread-safe-queue-using-condition-variables.html) and the reader could be processing it at the same time. This might make your execution faster.

Member Avatar for Ben_27
0
7K
Member Avatar for daino

What you have right now is a sigle letter. If you want to use a c-style string you need to define wrd like `char wrd[80]` where 80 is the number of charactures max that it can hold. You can change 80 to be what every you want but you want …

Member Avatar for deceptikon
0
42K
Member Avatar for naik.pranjal

Okay. What do you have so far? Do you know how to use for loops? Do you know how to use a char vareiable?

Member Avatar for Varun_8
-1
873
Member Avatar for k3rry41o

Well if we use integer math then the answer would be #include <iostream> int main() { std::cout << 1; std::cin.get(); return 0; }

Member Avatar for ddanbe
-2
104
Member Avatar for surayanbo
Re: Cpp

http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list

Member Avatar for NathanOliver
0
108
Member Avatar for Sara_13

For three integers you can hardcode it fairly simply as int a, b, c; std::cin >> a >> b >> c; int positiveCounter = 0; int negativeCounter = 0; if (a < 0) negativeCounter++; else positiveCounter++; if (b < 0) negativeCounter++; else positiveCounter++; if (c < 0) negativeCounter++; else positiveCounter++; …

Member Avatar for David W
0
285
Member Avatar for anumash

Derived classes only need to construct the classes the directly derive from. If those classes derive from something else then it the responsibility of those classes to construct what classes the directly derive from. Take the follwing example class Foo {}; class Bar : public Foo { public: Bar() : …

Member Avatar for NathanOliver
0
171
Member Avatar for anumash

Memeber functions are members of a class. Because of that they are not the same as free functions when it comes to function pointers. void (*ptr)(void); Will match any function that returns void at takes no parameters that is not a memeber function. void (A::*ptr)(void) Will match any function that …

Member Avatar for anumash
0
253
Member Avatar for herge

What is your question? 26,760,055 bytes is only 26.7 MB which is not very large in todays world.

Member Avatar for NathanOliver
0
144
Member Avatar for anumash

As [Bjarne Stroustrup](https://en.wikipedia.org/wiki/Bjarne_Stroustrup) has said >**C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg.**

Member Avatar for ddanbe
0
276
Member Avatar for New Jack

The first issue is your comparison operator is not folowing the strict weak ordering that `std::set` requires. You are only comparing `L` when you need to check if the `L`'s are equal and if they are then comapre against `r`. bool operator<(const _point &a)const { if (L == a.L) return …

Member Avatar for Moschops
0
192
Member Avatar for Gudger

Um 1, 4, 6, 12, 15, 20, 30 and 60 are not prime factors. the prime factors of 60 are 2, 2, 3, 5. You can prove that since `2*2 = 4` and `4 * 3 = 12` and `12 * 5 = 60`

Member Avatar for New Jack
0
283
Member Avatar for Farhan_4

Why are you looking for spaces in a csv file? csv stands for comma seperated values. Your file should look like 1.1,1.2,1.3 2.1,2.2,2.3 ...

Member Avatar for mellertson
0
19K
Member Avatar for you207

You could do this fairly easily with a `stringstream` and `getline()`. The split function would look like: std::vector<std::string> split_string(const std::string & line, char delim = ' ') { std::vector<std::string> sep; std::string token; std::stringstream ss(line); while(getline(ss, token, delim)) sep.push_back(token); return sep; } And then you could use it like int main …

Member Avatar for David W
0
558
Member Avatar for ddanbe

I will have to agree with @Suzie999 on this. Once you get into the mindset of using `const` whenever you have a constant value then you should just keep on using it. Not only does it keep the that behavior front an center but it is someting you should always …

Member Avatar for ipswitch
0
435
Member Avatar for nathan.pavlovsky

More than likely one of the headers that you are including in your code is including that header. This is something you should **NOT** rely on. You should explicitly include all headers needed to compile your code and not rely on something else including it for you. A different compiler …

Member Avatar for nathan.pavlovsky
0
258
Member Avatar for Aabir

You are not allowed to define a function in a function and that is what the compiler is complaining about. There are two solutions to this. You could move the function out of main and put it in the global scope or you can change the function into a [lambda](http://en.cppreference.com/w/cpp/language/lambda) …

Member Avatar for NathanOliver
0
500
Member Avatar for nathan.pavlovsky

@nullptr you should really be using a unsigned char as any other value is UB. http://en.cppreference.com/w/cpp/string/byte/tolower

Member Avatar for nathan.pavlovsky
0
719
Member Avatar for Suzie999

reading the answer [here](http://stackoverflow.com/questions/696117/what-happens-when-you-close-a-c-console-application) it looks like you can register an event handler with the OS and handle the closing of the cmd window youself. in the closing routine you could cleanly close out the API so it usable the next time.

Member Avatar for gusano79
0
261
Member Avatar for Mariana_1

And the reason you posted this again instead of using the wonderful advice Moschops gave you? If you need to follow up with you question please use: https://www.daniweb.com/software-development/cpp/threads/498358/game-on-c-

Member Avatar for NathanOliver
0
217
Member Avatar for can-mohan

As Moschops said you are moving the data from `p` so trying to use it after that results in your segfault. `std::unique_ptr` doe have an `operator bool()` that will return `true` if `get() != nullptr`. Using that we can protect against using the pointer if it no longer manages a …

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

Silly question but can't you have your teacher explain what you should have done not to have points taken off? It is hard for us to know what he is thinking.

Member Avatar for NathanOliver
0
204
Member Avatar for jamesjohnson25