Beginners - March 2016 (Page 16)

by Bopaki
compiling a program and getting an undifined reference to the destructor
 
Write your question here. When I include the destructor I get a warning that says: 92 16 C:\Martin\Zola\dayType.cpp deleting array '((dayType*)this)->dayTyp...
[3 replies] Last: Thank you all. I commented out the destructor and the program worked f... (by Bopaki)
Pls comment for further improvements...
 
Ive written a stack class.Heres the code: http://paste.debian.net/417593/ And main.cpp: http://paste.debian.net/417592/ I hav received various suggestions ...
[5 replies] Last: Normally you throw exceptions in the code that has to report an error ... (by Thomas1965)
Help with charter count using switch statement
 
I am trying to count the number of uppercase, lowercase, numbers and other characters that a user inputs. I have to do this using switch statements or I wou...
[3 replies] Last: You do not increase i in the while loop. So line 65 will always check ... (by Mathes)
calling a function error
 
solved
[2 replies] Last: Your prototype of int get_int_ref() does not declare the function void... (by Mops)
Cant figure out how to print out figures
 
I have to write a code that prints out three figures and I got the first one down but have no idea how to even approach the other two. Below are the two I have ...
[3 replies] Last: Hi sorry for late reply hope it helps anyway. I will try to explain wi... (by Mops)
Help with using a while loop.
 
I need help understanding how I could implement a while loop correctly in my code. I'm supposed to take data from a file (that doesn't involve using fstream but...
[1 reply] : You need to check cin to determine wether there is an error like eof. ... (by coder777)
Count of factors in loop
 
Hello all. I have this program where i am trying to figure out the factors of a given number through another file. But what i am having trouble with is adding u...
[1 reply] : What exactly is the problem? (by coder777)
by rantiv
Adding elements to an array
 
Im having a really hard time figuring out a function to add an element to an array. No vectors. Just arrays. I set it to a CONST of 100 and get user input to...
[3 replies] Last: void display_list( const string grocery_list , int current_list_siz... (by JLBorges)
What on earth is happening here
 
Why does the points value disregard that airtime is being rounded? scores = scores + Mathf.CeilToInt(airtime / 50); points = points + scores; ...
[4 replies] Last: When you do divide an integer with an integer the result is always an ... (by keskiverto)
Code design struggle ~ Help!
 
Howdy guys, Just started programming in c++, in terms of language/ syntax, everything is fine. My greatest issue with programming is designing the code flow/ s...
[1 reply] : I would create a "game" class, where you abstract the rules, points to... (by Bdanielz)
Help on hwk Assignment
 
For my hwk, I have to count the number of vowels, constants, capitals, and lowercase letters in a string of characters. I have to make 4 functions for this code...
[1 reply] : Where are your return statements? At the end of each count* function? ... (by keskiverto)
Cant fix declaration errors
 
Hi, I have a code that is supposed to ask the client name, address and phone number (this part works). Then show descriptions of 5 items I am selling and the pr...
[3 replies] Last: No worries, pleased to help :+) I guess there is a bit of a learning ... (by TheIdeasMan)
If/else inside of a do-while loop?
 
Not sure why my game is not working - any advice? The game properly loops as much as the user wants to play but it says Nobody wins no matter what the inputs a...
[2 replies] Last: Like Helios said, you're a gonna need some ( ) to make sure your boole... (by Viiarge)
by mn04
Create event calendar with Time, Event, and Month classes.?
 
Class Time – starting time of single event using: hour, minute and am/pm indicator. Class Event – description of event and time object associated with s...
[no replies]
Arrays and functions
 
Hey guys i am learning about how to use arrays and functions and i am getting this error (undefined reference to 'print (int const* , int ) ' what seems to be ...
[1 reply] : you are only showing us main(). Where do you define the print function... (by Ganado)
While Loop error
 
This is exact copy code from the book but does not run perfectly. why? He added while loop so expression such as 3+3+3+3+...+n can occur rather than a+b; The...
[4 replies] Last: @keskiverto Thanx a lot for explaining. I copied exactly the same. T... (by sadij97)
I need help with subtracting two text files
 
How would I subtract two text files from each other, and the output gets stored into another text file? As you can see in my code, lets say averageRainfall.t...
[3 replies] Last: anyone want to help me out? I am studying for my final (by uljimah)
by hihihs
abstract base class and constructor
 
I know that using abstract base class to virtual member functions. When there are variable data in the abstract base class, I do not know how to write the const...
[4 replies] Last: Thank you. This is correct: Dog::Dog(string a, string b):Pet(a,b) {} ... (by hihihs)
by noaboa
Load from file
 
I made an RPG game, with a map manager, I have now decided to try to make a tower defence game, and think I should use this. I removed some things and the progr...
[no replies]
Rock-paper-scissors game
 
I got about halfway into coding this game using if/else statements but then I realized the next question wants me to allow the user to play as many times as the...
[2 replies] Last: Okay I appreciate that I'll go ahead and implement that to repeat it. ... (by The117Vendetta)
March 2016 Pages: 1... 1415161718... 47
  Archived months: [feb2016] [apr2016]

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