Beginners - July 2012 (Page 20)

Function Help
 
I am having trouble with transfering from the main function to the other to other two functions. I get errors on lines 49 and 53. The errors are the same for bo...
[13 replies] Last: I suspect the problem here is that the modulus operator is returning a... (by rollie)
While loop only runs once.
 
The program works but it only runs through the for loop once i tried a while loop as well. int main(){ int quit = -1; //val 1 and 2 number...
[3 replies] Last: I replaced line 6 for(quit;quit<data.size();quit++) with while(quit... (by Mattkea123)
by arcane
Delete and deconstructors
 
Hello all. I'm trying writing a linked list. Everything works fine, but I don't grasp yet all of the concepts behind delete and deconstructors. I know that I am...
[6 replies] Last: Every statement of the form x->~Node(); or (*x).~Node(); is incorr... (by helios)
Help in declaration;
 
class game { struct player; { int position ; ..... ... } } I want to declare the objects of struct player such...
[2 replies] Last: yes you figured it out right,,I want to define some points on output ... (by Pter0dactyl)
Trying to understand pointers!
 
Hi! New to C++ and pointers, trying to understand Why they exist. I understand how it works (I think) with them but it is the usage i dont understand. http:...
[9 replies] Last: Thanks for all the help! Though i understand how pointers works i thi... (by ClintEastwood)
by beakie
error C2662 cannot convert 'this' pointer from 'const n' to 'n &'
 
Getting this error... error C2662: 'Txt::stringlength' : cannot convert 'this' pointer from 'const Txt' to 'Txt &' What does it mean, please? class ...
[1 reply] : You may not apply function stringlength to a pointter that refers to c... (by vlad from moscow)
Please help with short form roman numerals c++
 
i have long form packed down farely well. i just need the last 2 "nothing" and "imverytired" strings to be short form roman numerals. ie (long form: 524=DXXIIII...
[1 reply] : U could start by replacing lines 94 to 100 with this... if(w%5 == 4)... (by soranz)
Fibonacci Sequences
 
I am having problems with my code to find the answer to Project Euler problem 25. I already found the answer online for troubleshooting, but I still can't get ...
[4 replies] Last: You set the entire 2d array to zeros, and then make and equal to... (by Lowest0ne)
noob question
 
Hey guys, im trying to learn C++ myself this summer and was going through some programming examples. Now, in one of the examples read, i saw this bit of code w...
[5 replies] Last: For most tasks u can just as easily substitute using pointers for refe... (by soranz)
How do I make short form roman numerals with c++??
 
i have long form packed down farely well. i just need the last 2 "nothing" and "imverytired" to be short form roman numerals. ie (long form: 524=DXXIIII) (short...
[3 replies] Last: It's what you get when you hit the"<>" Format icon to the right of the... (by Texan40)
by Ch1156
QT wont build project
 
i press the green arrow, nothing happens. I can see the build meter go up but thats all that happens. i got this message 19:50:58: Running build steps for pr...
[1 reply] : please help (by Ch1156)
What is a allocater?
 
What is it and what is it used for? I'm a beginner so try to have some easy to understand info while being informative at the same time, i've google'd it but...
[3 replies] Last: Allocator is a class that can do four main things: 1) obtain storage 2... (by Cubbi)
Question about two dimensional arrays
 
So I am just learning about two dimensional arrays and started to play around with the implementation and found something weird. Why is it that when incrementin...
[4 replies] Last: Arrays are placed in memory rows by rows. Your original array has onl... (by vlad from moscow)
char & pointers
 
double get_number() { char s ; cin.getline(s, 99); if(strlen(s) == 0) return 0.0; return atof(s); } In the C++ book I'M reading chars are defined by ...
[1 reply] : The name of an array is converted to the pointer to its first element ... (by vlad from moscow)
Help with Classes??
 
I have just started to work on a game of rock paper, scissors. I have decided to make a class for a welcome message and i come with the following errors: Err...
[12 replies] Last: Whats heppening is you are not passing any paramaters to your function... (by bmiller)
Confused about a problem on exchanging an array
 
here is the question from my teacher, i'm not sure how to get started on this: "Consider the following sort procedure written in pseudo code: ...
[2 replies] Last: It seems that this algorithm is the selection sort but with numerous s... (by vlad from moscow)
Bug in basic C program
 
The program is supposed to calculate the height of a tree based on two individuals heights and distances from each other and from the tree. It uses a formula fo...
[3 replies] Last: The best way to catch things like that is walk through your code step ... (by Volatile Pulse)
by carl89
Flip Last Digit of an Integer to front (1,2)
 
Hi Guys, I need to flip an integer's last digit to front and print out new integer: ie. Lets says my original integer is 19896 then i like to have a out p...
[22 replies] Last: No, I mean his response was bad style. (by Duthomhas)
If the user chooses 1 of 3 objects, how can I get the rest of the program to us that object
 
I am making a pokemon based text game. I gave the user of picking from three pokemon at the beginning. If the user chooses, lets say, Charmander (an object), ...
[3 replies] Last: Something a little simpler is to create an array of your pokemon: // ... (by Volatile Pulse)
Can anyone please help? Do-while statement
 
Hi everyone! I'm having a very hard time figuring out how to make my Do-While statement work in this Traveltour program. It's looping but it doesn't store the i...
[7 replies] Last: Yes, you will want to use arrays for that. Ideally, actually, you'd wa... (by closed account o3hC5Di1)
July 2012 Pages: 1... 1819202122... 54
  Archived months: [jun2012] [aug2012]

This is an archived page. To post a new message, go to the current page.