1,426 Posted Topics

Member Avatar for Lp_baez

what compiler are you using? if you are using msvc++ you have to pick a win32 console application.

Member Avatar for Lp_baez
0
386
Member Avatar for soche123
Member Avatar for lewashby

You are trying to initialize a 2d array when you onlty declared a 1d array. You can change it to char arrayOnes[][10] = {"", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"} If you can use strings I would suggest doing this std::string arrayOnes[10] = {"", "one", "two", "three", …

Member Avatar for mike_2000_17
0
180
Member Avatar for no_one16

do you know the % operator? do you know how to use an loop? do you know how to use an array? those are really all you need to figure this out.

Member Avatar for kvahanyan
0
154
Member Avatar for me.rohitverma

you need a closing brace on line 704. you also would benifit greatly properly indenting your code.

Member Avatar for Moschops
0
278
Member Avatar for nathan.pavlovsky

There isnt a way to add commas to the output natively but you can wrtie a function to do it for you.

Member Avatar for gusano79
0
369
Member Avatar for maalaakhantaurux

I am amazed that people don’t even try to Google for an answer. Most of the time the first page has the answer and so much more.

Member Avatar for rubberman
0
305
Member Avatar for Abhinisha

Yes a `char*` is a pointer to a char that can be modified. a `const char*` is a char pointer that cant be modified.

Member Avatar for NathanOliver
0
213
Member Avatar for furalise

Well if you want to store the sentance in a variable use a string not a stringstream. Your code would look like this string line; getline(cin, line); // gets the sentence from the command line and place it in line cout << "You Entered: " << line << endl;

Member Avatar for furalise
0
4K
Member Avatar for soche123
Member Avatar for daniel1977

Can you narrow down where the problem is. I'm not going to read ~1000 lines of code to find the answer.

Member Avatar for dexblack_1
0
623
Member Avatar for iraklakis

The first thing I would do is name your variables something descriptive. I'm not sure of the rest of the people on this site but if your code isnt somewhat easy to read I'm not going to make the effort.

Member Avatar for iraklakis
0
235
Member Avatar for DarrelMan

@ sanyam.mishra `char* argv[FILENAME_MAX]` is an array of pointers so it is a 2d array. @ DarrelMan have you walked through the code with the debugger to see what is inside argv[0]? If you dont know how to step through the code with the debuger you could just output the …

Member Avatar for DarrelMan
0
196
Member Avatar for naveen19

Sure you can do this with c++. You will need to know how to use [file streams](http://www.cplusplus.com/reference/fstream/fstream/) and [strings](http://www.cplusplus.com/reference/string/).

Member Avatar for NathanOliver
0
93
Member Avatar for DanDaMan
Member Avatar for gobiking

add this after line 14 to see if your file is being opened. if(!myfile) std::cout << "Unable to open file" << std::endl;

Member Avatar for gobiking
0
247
Member Avatar for maml

Passing by reference or value should be pretty much the same for POD types. In this case your struct only contains POD types so passing the struct by value or passing all of the variables by reference should be the same. If you want to you can pass your struct …

Member Avatar for annaharris
0
389
Member Avatar for new_developer

Not to pick nit but shouldn't line 35 be `delete [] p;`, since the first level of p is in itself an array?

Member Avatar for deceptikon
0
245
Member Avatar for CodyOebel

where are you getting a value for hwndDC? does hwndDC hold a handle to the window of the game you are trying to hack?

Member Avatar for Suzie999
0
343
Member Avatar for mr.muin13
Member Avatar for MRehanQadri

If I was doing this I would read each line of the file into a string array. After that I would go through each string in the array and insert a `b` in front of every `B`. Then I would just overwrite the contents of the file with the modified …

Member Avatar for MRehanQadri
0
231
Member Avatar for breezett93

@AD Wont the compiler see that the value of the expression never changes and optimize it away?

Member Avatar for Labdabeta
0
3K
Member Avatar for ilian.bonov

It is not the same thing Sales::Sales() { double sales[] = {0.0, 0.0, 0.0, 0.0}; } The above code creates an double array called sales in the constructor which hides the sales array that is a member of the class. Once the constructor is done this local array that has …

Member Avatar for ilian.bonov
0
141
Member Avatar for SA_PlaYeR

#include <iostream> int main() { std::cout << "Hello World!" << std::endl; std::cin.get(); return 0; }

Member Avatar for NathanOliver
-1
136
Member Avatar for kcys.wong

give [this](http://www.daniweb.com/software-development/cpp/threads/90228/flushing-the-input-stream) article a look.

Member Avatar for Ancient Dragon
0
255
Member Avatar for mohammad.alsheyab
Re: help

>This is a C++ program that reads as input a text file. Where? I didnt see one.

Member Avatar for Stuugie
-2
138
Member Avatar for lee.martin.568847

>program does not work: Can you alaborate a little more than that? Your fist for loop needs to have its statements wrapped in brackets since there are multiple lines. for(int i = 0; i < 7; i++) { //code here //code here } You are never multiplying the total by …

Member Avatar for lee.martin.568847
0
1K
Member Avatar for kamalashraf

Well you can take the number in as a string and make sure that there is only 1's and 0's in it.

Member Avatar for Banfa
0
543
Member Avatar for tinos
Member Avatar for tensity
Member Avatar for Moschops
0
116
Member Avatar for tensity

how does the >> operator work for your `Polynomial` class? I ask because if you use getline inside the `Polynomial` class then `cin >>` will be throwing you off. What happens if you put `cin.get()` between lines 34 and 35?

Member Avatar for tensity
0
255
Member Avatar for Kesarion

So you need to find some group of 3 items that has the same type and the highest sum of thier values? If that is the case then I would split you main array into seperate arrays for each type. Then sort those arrays in descending order. Then find which …

Member Avatar for Kesarion
0
264
Member Avatar for yankeetooter7
Member Avatar for Jack Mao

Not with that amount of information. What are you trying to do? Is this a code problem? I know a picture is worth a thousand words but I think the words would do a better job of explaing what you are trying to do.

Member Avatar for NathanOliver
0
53
Member Avatar for amjadalibooni

So what do you have so far? Do you know how to use a [string](http://www.cplusplus.com/reference/string/string/)? The `find_first_not_of()` function can be really helpful.

Member Avatar for Moschops
0
88
Member Avatar for taimor

On line 4 you declare `o` as `int *o=new int;`. This ony gives you a single int pointer. So when you call line 16 you invalidate the pointer because you step out of the memory allocated to it. It looks to me like you need `o` to be an array. …

Member Avatar for taimor
0
162
Member Avatar for nifhail
Member Avatar for ayoob22

This is sudo code but you shoud be able to get it to work for index = startIndex to index = endIndex print array[index]

Member Avatar for DavidB
0
234
Member Avatar for preet4fun
Member Avatar for NathanOliver
0
2K
Member Avatar for ConfusedLearner
Member Avatar for NathanOliver
0
217
Member Avatar for TheNewbie1234

[floor(](http://www.cplusplus.com/reference/cmath/floor/)) rounds down to the nearest integer.

Member Avatar for Schol-R-LEA
1
1K
Member Avatar for nick.rechtien.5

You are not passing any variables to your functions. Since you want to update what the values of the variables are you need to pass them by reference. You also need to get rid of the declerations of win, lose and tie in your functions. `displayWinner()` should look like this …

Member Avatar for NathanOliver
0
151
Member Avatar for sherubdorji
Member Avatar for ztdep

line 49 needs to be: temp = temp + (data[i] * x.data[i]); If you are mulitplying each vector element agianst the other. One issue I see is how are you going to handle mismatched vector sizes?

Member Avatar for ztdep
0
233
Member Avatar for robert.speciale

What all is in word? is it just one word or a sentence. I ask because I dont know of a word that is 40 letters long outside of chemical compounds. How do you want to split the word? If the word puts you over 40 charecters do you split …

Member Avatar for robert.speciale
0
189
Member Avatar for Suzie999

[stoi()](http://www.cplusplus.com/reference/string/stoi/?kw=stoi) is overloaded to take a string or a wstring.

Member Avatar for Suzie999
0
216
Member Avatar for poopoowei

Well if you can use the string classs the you can use the [find()](http://www.cplusplus.com/reference/string/string/find/) method to look for the word include. Then parse from there to make sure it is correct.

Member Avatar for NathanOliver
0
227
Member Avatar for nomorelogic
Member Avatar for bops
Member Avatar for NathanOliver
0
5K
Member Avatar for malloju

Where are the `swt()` and `iswt()` functions declared/defined? Are they in the wavelet2d.h header file?

Member Avatar for Moschops
0
145

The End.