Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
94% Quality Score
Upvotes Received
20
Posts with Upvotes
18
Upvoting Members
13
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
5 Commented Posts
0 Endorsements
Ranked #630
~70.4K People Reached
Favorite Forums
Favorite Tags
Member Avatar for adoleh

You're doing the calculations before you're getting the number, and since num will be 0 at that point, tens digit and ones digit will always equal zero, no matter what. You need to take in your number THEN do the calculations for tens digit and ones digit.

Member Avatar for emsmary
0
16K
Member Avatar for AmerJamil

You may want to start with a loop, to take in the digits. Make sure you have a way to ensure that, when added, if a digit exceeds 10, it gets added to the higher digit. Also, remember that arrays begin with [0] and not [1], when you're programming the …

Member Avatar for JamesCherrill
0
1K
Member Avatar for TheFearful

Your array is not two-dimensional. I also suggest using a variable for input as opposed to just defining every possible outcome. You're setting yourself for one tedious and hard to follow jumble of code. An example: [code] unsigned short x,y; cin >> x >> y; myArray[x][y]= 'X' [/code] This takes …

Member Avatar for マーズ maazu
0
3K
Member Avatar for ankit.4aug

I smell homework. Read up in your reference book on implementation of pointers.

Member Avatar for Suchita_1
0
140
Member Avatar for jonspeidel

[QUOTE=jonspeidel;1688769] [CODE]#include<iostream> #include<windows.h> #include<conio.h> #include<strings.h> using namespace std; int main(); void repeat(); void worked(); string s1; string s2; string s3; int main() { repeat(); } void repeat() { string s3="n"; cout << "Would you like to perform another operation?\n"; cin >> s3; if((s3=="Y" || "y")) { worked(); } if((s3=="N" || …

Member Avatar for WaltP
0
251
Member Avatar for jpico

[code]if (conversion !=1|| conversion !=2|| conversion !=3|| conversion !=4|| conversion !=5|| conversion !=6)[/code] Can be changed to [code]else[/code] Since the above is implied through the preceding code. Also be careful with your brackets. Line 73 is the end of your do loop and line 76 is the end of int …

Member Avatar for Red Goose
0
151
Member Avatar for ktsangop
Member Avatar for ktsangop
1
2K
Member Avatar for phorce

[QUOTE=jackmaverick1;1689724]I think there's a char code that you can use. (like /20?)[/QUOTE] Blank space IS a char. [code] #include <iostream> using std::cout; int main() { char c = ' '; cout <<"Space" << c << "is" <<c <<"a"<<c<<"Character."; cout <<"\nAscii code = " << int(c); return 0; } [/code] Note …

Member Avatar for Red Goose
0
105
Member Avatar for alarifth

[code]Person::Person(string first = "", string second = "")[/code] Out of curiosity, what are you tying to accomplish with your parameters?

Member Avatar for mzimmers
0
9K
Member Avatar for slygoth

Just open an output stream and save them to a text file, you're already halfway there.

Member Avatar for slygoth
0
105
Member Avatar for DeusManP0W

1. You're not using a char variable, you're using an integer variable. Integers are strictly numerical. 2. Character variables can only hold 1 character. This is due to size limitation of the variable. You will need an array characters to accept input with more than one character. If this sounds …

Member Avatar for DeusManP0W
0
210
Member Avatar for kkreisler

You're asking for input of a character but your variable is an integer, which can only be numerical. The problem your seeing is common to mis-matched variable types. A for loop is also the incorrect type of loop for this particular function. The loop outlined above would serve your purpose …

Member Avatar for kkreisler
0
148
Member Avatar for RisTar

You have your array declare globally, I'd change that. Also, try declaring the range of the array inside your function. I'd imagine by the nature of multidimensional arrays your compiler will want that specified. Example: [code]myfunc(int array[0][5]) //change the '0' to '5'.[/code]

Member Avatar for RisTar
0
165
Member Avatar for shizu

[QUOTE=shizu;1494701]Hi luce.. I try your code already.. once compile I get error message like below show.. ****************************************************************** error C2065: 'Image' : undeclared identifier error C2146: syntax error : missing ';' before identifier 'image' error C2065: 'image' : undeclared identifier error C2065: 'GetEncoderClsid' : undeclared identifier error C2228: left of '.Save' …

Member Avatar for mrnutty
0
2K
Member Avatar for Mr. K

[url=http://advancedcppwithexamples.blogspot.com/2009/08/measuring-elapsed-time-in-c-using_21.html]QueryPerformanceCounter[/url] 20 pixel per second = 1ms x 50 per pixel. Perform the check via subtraction and if the time difference exceeds 50, move one pixel. Of course, you'll then need to reset the "clock" so to speak. Alternatively, you could just grab the time via Clock(), that measures the …

Member Avatar for Mr. K
0
188
Member Avatar for valestrom

You're skipping your if loops: [code] if (gamechoices == "Attack" || gamechoices == "fight" || gamechoices == "kill");[/code] The semicolon ";" at the end terminates the if statement. You need to place anything that will be executed within your if loops within brackets "{ }". It's a common mistake since …

Member Avatar for valestrom
0
278
Member Avatar for flyboy567

1.Make sure everything is kept as a character; use some denotation as terminator so you can have multi-digit numbers without much difficulty. 2.Convert these chars to their ASCII equivalent integer. If the ASCII value of the char is between 0-9, give it precedence over any non-integer character. A simple boolean …

Member Avatar for mike_2000_17
0
157
Member Avatar for FrancisLazo

Why the use of strings? Boolean statements would work just as well(better even): [code] bool seat[200]; [/code] And then... [code] if (seat[input] == 1) cout << "Seat Number" << input << "is reserved. Please choose another."; else seat[input] = 1 [/code] And there you go. Your 500 hundred line case …

Member Avatar for Red Goose
0
223
Member Avatar for caltech

[QUOTE=Moschops;1486526]Your divides function takes two int objects as parameters, and returns an int. Accordingly, you must call it like this: [CODE]returnedInt = divides (someInt, someOtherInt);[/CODE] where [B]returnedInt[/B], [B]someInt[/B] and [B]someOtherInt[/B] are all of type [B]int[/B].[/QUOTE] Or, he could use an if statement to check the returned value like so: [code] …

Member Avatar for caltech
0
125
Member Avatar for mrgreen

Why use a queue at all? The queue is only gonna return the same thing as your string in the first place. Remember the nature of a stack. A stack is somewhat unfair and believes that the last person to come should be the first to go. Think of a …

Member Avatar for biljith
0
173
Member Avatar for Stefano Mtangoo

[QUOTE=Fbody;1484874]So are you saying that you can generate closed-source code, and use a license of your choosing for it, so long as you have an appropriate notice concerning, and provide access to, the MySQL License and Source in compliance with the GPL?[/QUOTE] Read more about the GPL [url=http://www.gnu.org/philosophy/selling.html]here[/url].

Member Avatar for Stefano Mtangoo
0
449
Member Avatar for c+-

Just to clarify, the prototype is what tells the compiler that the function exists, so if another function calls that function before it is actually defined, the compiler knows it exists and doesn't need to throw an error at you. A class declaration (as you've shown), is the same thing. …

Member Avatar for template<>
0
510
Member Avatar for schrope

[QUOTE=schrope;1481422]that is what i thought but it is not working-- i rewrote the last line of code digit_two+=7%10; //add digit_two to 7 and mod 10 digit_three+=7%10; //add digit_three to 7 and mod 10 digit_four+=7%10; //add digit_four to 7 and mod 10 cout <<"Encrypted digits:" << digit_three digit_four digit_one digit_ two …

Member Avatar for Crutoy
0
181
Member Avatar for FriXionX

[QUOTE=FriXionX;1478480]Gah, so confusing. I'm gonna learn a bit more, then come back to this, because i dont really understand at the moment. Thanks for the help anyway, ill refer back to this later.[/QUOTE] You should probably find a textbook or some sort and learn from that. If you follow it …

Member Avatar for Kanoisa
0
243
Member Avatar for jonspeidel

You're not looping because s2 doesn't equal anything. Don't use goto, you have the right idea with a loop, you just need to fix your execution. Either: 1. Ask for the input of s2 before ending your loop. 2. Check s1 for a specific input and if it equals that …

Member Avatar for 1ML
0
398
Member Avatar for surferxo3

Hint: You can check the validity of the board by the sum of all the numbers within a given column or row.

Member Avatar for surferxo3
0
143
Member Avatar for kra9853

To see every available character, compile and run this code, if you can make the "cent" symbol in a char or string, it'll be there: [code] #include <iostream> #include <iomanip> using namespace std; int main() { char c; for (int x = 0; x <= 255; x++ ) { c …

Member Avatar for mike_2000_17
0
798
Member Avatar for Sundayy

Your if statements aren't doing anything to begin with. You may want to carefully reexamine if statement implementation.

Member Avatar for peter_budo
0
436
Member Avatar for Juan-Ellyn
Member Avatar for Juan-Ellyn
0
172
Member Avatar for lashatt2

Well, this isn't C++. Also, I don't fully understand the question. You simply specify that Column before you perform the action. There's not much else to it.

Member Avatar for smantscheff
0
113