1,426 Posted Topics

Member Avatar for rasha80
Member Avatar for Lilgenski16
Member Avatar for マーズ maazu
0
2K
Member Avatar for krypton25
Member Avatar for andrehernandes

So what exactly do you need help with? Just posting your problem statement and hoping someone will give you code isn't going to work here.

Member Avatar for ddanbe
0
187
Member Avatar for yaya1234
Member Avatar for Maritimo
0
286
Member Avatar for Tech_learner

I personally wouldn't use C++ for .Net programing. I would and have used C#.

Member Avatar for NathanOliver
0
49
Member Avatar for Garidius

It is possible to do but depending on how big your project is you might not want to do it that way. Calling another exe file requires a system call which incurs a lot of overhead. If it is possible I would just wrap you previous program in a wrapper …

Member Avatar for Garidius
0
661
Member Avatar for alexandar.valentinov
Member Avatar for EarlZhaoy

Read a book, take a class, watch you tube tutorials. They're are lots of ways to learn C++, the question is how much time and money do you want to devote to it.

Member Avatar for gusano79
0
93
Member Avatar for cambalinho

What is the error you are getting? An `LPSTR` is just a `char*` and a `LPCSTR` is a `const char*`. Since `std::string` has `operaotr==(std::string, const char*)` you should be able to get rid of line 12 and change line 14 to `if (caption == s.dwTypeData)`

Member Avatar for cambalinho
0
865
Member Avatar for abdalimran

line 5: `void print(string *ar[])` which becomes line 5: `void print(string **)` line 23 `print(&s)` which becomes line 23 `print(s)` Since the name of an array is the address of the array. In your code if you put before line 23 cout << s; cout << &s; You should get …

Member Avatar for NathanOliver
0
298
Member Avatar for Deepesh_1

When dealing with a 2d vector/array the first dimension is the row and the second dimension is the column. If you wanted to go through all of the elements you would need two loops, one for the number of rows and one for the number of columns. Putting that together …

Member Avatar for Taywin
0
3K
Member Avatar for senait.kifle.127

There are two main ways to delete a list that I know. You can use recursion or you can iterate. // recursion void delete(listNode node) { if (node.next != nullptr) delete(node.next); delete node; } // iteration void delete(listNode node) { listNode temp; while (node != nullptr) { temp = node.next; …

Member Avatar for NathanOliver
0
256
Member Avatar for Maritimo

B& operator=(const B& b) // Copy Assignment { if (&b != this) // you should always do this so you dont do a self assignment { A::operator=(b) // call A copy assignment i2=b.i2; } return *this; }

Member Avatar for pritaeas
0
398
Member Avatar for amal.mohammed.7505
Member Avatar for jencas
-1
262
Member Avatar for hamza233

Step 1: Write a problem statement for what you want to do Step 2: Write an outline, if it is complex Step 3: Write up a section in pseudo-code (English instructions) Step 4: Write the section in the programing language of your choice Step 5: Compile the program. Step 6: …

Member Avatar for rubberman
0
200
Member Avatar for wael1sham

I dont think so. Maybe you should read the [Rules](https://www.daniweb.com/community/rules).

Member Avatar for NathanOliver
0
145
Member Avatar for bjf1992
Re: c++

Isn't that question for you to solve? We will help you hear, not give you the answers.

Member Avatar for rubberman
0
117
Member Avatar for Lilgenski16

Line 167: `GenericPLayer::GenericPLayer(const string& name);`. Get rid of the semicolon at the end. Line 184: `class Player` Line 189: `virtual ~PLayer();` Do you notice the difference between the class name?

Member Avatar for Lilgenski16
0
235
Member Avatar for arjay.veliganio

I would split the string up into an vector of sub strings. Reverse each sub string in the vector. Then combine them all back together. You can easily split a string with spaces by using string streams: std::stringstream ss; string line = "What a sunny day"; std::vector<std::string> parts; string temp; …

Member Avatar for NathanOliver
0
146
Member Avatar for Builder_1

What do you need help with? Your instructor gave you how the program should function and work. Is there a part you don't understand?

Member Avatar for Builder_1
0
380
Member Avatar for DarkT

[This](http://blogs.msdn.com/b/heaths/archive/2012/03/07/why-visual-studio-11-requires-space-on-the-system-drive.aspx) details why this can't be done. There is a hack [here](http://www.placona.co.uk/1196/dotnet/installing-visual-studio-on-a-different-drive/) that you can do to get around this but it is not microsoft approved.

Member Avatar for mike_2000_17
0
340
Member Avatar for Lilgenski16

That is because you have the declaration commented out on line 92. void Hand::Clear() { //iterate through vector , freeing all memory on the heap vector<Card*>::iterator iter = m_Cards.being(); for (iter = m_Cards.begin(); iter !=m_Cards.end(); ++iter) { delete *iter; *iter = 0; } //clear vector of pointers m_Cards.clear(); } Should …

Member Avatar for Lilgenski16
0
241
Member Avatar for schroaus

I would use the modulo operator (%) and division for this. Modulo gives you the remainder of integer division so `100 % 10 = 0`. So if `100 % 10 = 0` then you need to get rid of the rightmost 0 by division. Divsion by 10 will do that. …

Member Avatar for schroaus
0
126
Member Avatar for Lilgenski16

You have ab extra `}` on line 197. get rid of that and it should compile. No sure if your code is exactly right though. it looks weird that you have 3 `if(!found)` statements.

Member Avatar for NathanOliver
0
270
Member Avatar for Anitha Nair

Step 1: Write a problem statement for what you want to do Step 2: Write an outline, if it is complex Step 3: Write up a section in pseudo-code (English instructions) Step 4: Write the section in the programing language of your choice Step 5: Compile the program. Step 6: …

Member Avatar for NathanOliver
0
126
Member Avatar for nadia.batool.56863

Okay go ahead and get coding. Is there a part you dont understand?

Member Avatar for NathanOliver
0
123
Member Avatar for Diellza

Did you copy this code from somewhere? I have a hard time believing that you could produce this code and not know how to generate random numbers.

Member Avatar for Diellza
0
617
Member Avatar for NathanOliver

Did a recent change happen to the spell checker? I could be wrong but now it is spell checking things inside code tags to where before I can't remember it doing that. I also had a weird result when spell checking with a web link where it changed the web …

Member Avatar for Dani
0
78
Member Avatar for xaxl1x
Member Avatar for ayesha.newtn

What problem are you actually having? Do you know how to find if two circles on a plane intersect? I don't think you will find anyone on here that is willing to do your work for you. To find out if two circles intersect you can see if the difference …

Member Avatar for David_50
0
209
Member Avatar for sarauta

Is there anything in particular you want to know. I don't think anyone on here is just going to tutor you in C++.

Member Avatar for Search_not
-1
191
Member Avatar for Chay_1

If you really want to clear out the input buffer then you should use [Narue's code](https://www.daniweb.com/software-development/cpp/threads/90228/flushing-the-input-stream). Calling `std::cin.ignore( std::numeric_limits<std::streamsize>::max(), '\n');` should work almost always but as Narue mentions in her post there a a couple edge cases that will break it.

Member Avatar for NathanOliver
0
495
Member Avatar for Glaven

You also need to get rid of line 23. that will force you out of the loop on the first iteration which is not what you want.

Member Avatar for NathanOliver
0
744
Member Avatar for usmanjani

First you have to write classes that will define every object that is represented in that scene. Once you have that then you need to use those classes in your code to create each object. Just from looking at the picture you are going to need at least 10 different …

Member Avatar for usmanjani
0
318
Member Avatar for Captain119

`while (!inFile.eof())` is never the way you want to read from the file. When reading the last line of the file the EOF flag does not get sent until it tries to read past the last line so `while (!inFile.eof())` will actually read all lines in the file plus one. …

Member Avatar for Captain119
0
2K
Member Avatar for Sunil_12

Well a queue is a FIFO data structure. In order to sort it you need to to find the smallest part by popping the front and checking it against a min variable. Then if it is not smaller push it back on the back of the queue. Do that until …

Member Avatar for Sunil_12
0
604
Member Avatar for muhd.hadziq
Member Avatar for muhd.hadziq
0
270
Member Avatar for aluhnev

CTime_24& CTime_24::operator+=(int seconds) { m_Seconds += seconds; m_Minutes += this->m_Seconds / 60; m_Seconds %= 60; m_Hours += this->m_Minutes / 60; m_Minutes %= 60; m_Hours %= 24; return *this; } ////+= operator /// CTime_24 CTime_24:: perator+=(CTime_24& sTime) { m_Seconds = m_Seconds + sTime.m_Seconds; m_Minutes = m_Minutes + sTime.m_Minutes + m_Seconds / …

Member Avatar for aluhnev
0
151
Member Avatar for schroaus

This could be done very simply with the strings [] operator: int main() { std::string line; std::cout << "Please enter you string: "; getline(std::cin, line); // loop through each letter and add 2 to it while displayng it for(std::string::size_type i = 0; i < line.size(); ++i) { std::cout << char(line[i] …

Member Avatar for NathanOliver
0
127
Member Avatar for kotachari

What are you supposed to do with the data when you get it? What part of reading in from the file is giving you a problem?

Member Avatar for L7Sqr
0
407
Member Avatar for cambalinho

What are you trying to do with this? From what I know about lambda's `[this]()->x` means: function that captures the this pointer and returns x and has no function body. It would be helpfull to see the use case for your macro. Also are you sure you want to use …

Member Avatar for cambalinho
0
138
Member Avatar for Kwasi Sefah

`<cmath>` is the c standard math library. You would need to included it when you want to use the standard math function. [Here](http://www.cplusplus.com/reference/cmath/) is a list of all the functions contained in `<cmath>`. The header has also been updated with c++ functions parameters/returns that are not available in c.

Member Avatar for Kwasi Sefah
0
172
Member Avatar for ziarashdi26

@ Fosterzone An array isn't just for int's. All an array is is a group of elements that all have the same type. each element is differentiated by a unique identifier (index). You can think of an array as a cubbyhole. The array has a number of spots equal to …

Member Avatar for NathanOliver
0
139
Member Avatar for Gurjit_1
Member Avatar for Prince.Sahil039

I think you missed the most important part of the assignment. >You are required to write a program...

Member Avatar for NathanOliver
-3
120
Member Avatar for CPTSNGR

What is the problem you are having? Taking some else's broken code and trying to use might not be the best approach.

Member Avatar for NathanOliver
0
70
Member Avatar for Simon180

Can I ask what `char *strerror(num) int num;` means? I have never seen a function declared like that before.

Member Avatar for NathanOliver
0
1K
Member Avatar for gadgets1010

Well when you make a wrapper class you are basically redoing the public facing side of the class. Lets say the class has a bunch of everloads that you never want to be seen. What your wrapper class would provide is the one function you want and it would forward …

Member Avatar for Banfa
0
163
Member Avatar for budax.bageur2

Someone probably can but you need to start your own thread and explain show the code that you have and what part you are having trouble with.

Member Avatar for NathanOliver
0
218

The End.