Beginners - November 2014 (Page 47)

how do i count up the total at the end? program is able to run
 
so after the program finish running i would like it to print the number of valid group and invalid group for example 5 total 3 valid 2 invalid group eve...
[6 replies] Last: in your validset() function, add int& valid, int& invalid. Initialize... (by disturbedfuel15)
Do you have to declare a class object in order to pass values to a constructor?
 
When it comes to constructors, do you have to declare a class object in order to pass values to that constructor? Just look at the program below to see what ...
[1 reply] : Color ("Why can't I pass a variable to the constructor?"); is a cas... (by JLBorges)
by moufou
problem with creating object
 
I'm trying to make a pack of cards but I have a problem with how to create the object (Card and Deck), now I'm testing the Card class and I don't know why it do...
[18 replies] Last: As long as objects created from the class remain responsible to displa... (by PCrumley48)
Trouble with errors related to Class, Objects, and Arrays.
 
I really burnt out from this program and have the following errors , any help would be awesome, thanks. PS. the dat i'm trying to upload has the following inf...
[1 reply] : You've got some copy-paste artifacts (by instance, line 17), please fi... (by ne555)
how to skip a function in main program? program can be runned
 
i want my main program to skip classify if the group is invalid. int main() { int x,y,z; char answer; do { cout << "Type i...
[4 replies] Last: You're welcome. Why did you delete the original question? Others may... (by disturbedfuel15)
Reading From a File
 
I have to read and analyze a file called Random.rtf full of random numbers. The output of my program is: File Random.rtf is open. Number of Numbers: 0 ...
[5 replies] Last: add one more line to your first if statement. if (num >= big_num) { b... (by disturbedfuel15)
new to C++/this forum hi!
 
hi so im new to c++ and am trying to change a number; int hep=0; switch(hep) { case 0: if ( item.n...
[5 replies] Last: thank you. ok i have this now..not sure if c++ needs {} for the ifs t... (by zartan917)
void function problem
 
i have problem with void findpattern function. the void function always return the same couts. void findpattern (int,int,int); void classify (int,int,i...
[4 replies] Last: I'm gonna help you with one of the statements, this is one of the ways... (by Jacobhaha)
Add Movable Player to Map (1,2)
 
I have just created a 15 x 20 map using a 2D-array. I am trying to add a movable player, but I can't figure out how. If at all possible, this is something I wou...
[39 replies] Last: Apologies for not posting sooner but I've been very busy with coursewo... (by Bogeyman)
Vectors in Functions
 
I'm trying to create a function that will take in string s and vector<string> words. In my main function, I'm trying to change the 1st and 2nd elements of the ...
[2 replies] Last: Thanks. (by Extreme112)
Compiler keeps giving out the error "unterminated #ifndef"
 
I am trying to make a class "specification" file so i can include it in my other .cpp file. But every time i try to run the program, the compiler keeps barking ...
[1 reply] : You need to match the #ifndef with a closing #endif http://www.cprog... (by wildblue)
Issue checking for an exception
 
I am adding in exception handling into my code and I have hit a bump in the road. I want to require that eight digits be entered for an account number and then ...
[1 reply] : long acct_num; //Define a variable line 15 else if (acct_num. leng... (by wildblue)
by wolfv
Two libraries containing identical include guards
 
It could happen that two independent libraries have two header files with identical include guards. The following example is like that; as a consequence, the se...
[2 replies] Last: Thanks Esslercuffi. The "#pragma once" directive looks interesting. (by wolfv)
by cGuru
Creating Username & Password
 
NOTE: If you could help me out with just one of these, then that would be greatly appreciated! NOTE: Code is at bottom! Goal: Create a user acc...
[no replies]
functions
 
I have been working on this program for several days.I have it compiling but it will not calculate the employees gross pay or total gross can anyone help. //...
[1 reply] : 1. Compare getGrossPay() prototype and definition - parameters are m... (by rich1)
Dictionary with swich statment and string
 
Hey guys, I've tried to write a quite simple programm, a dictionary for me and my classmates, where you enter the word you don`t know and get the definition o...
[3 replies] Last: You will not find a solution because as wildblue said you cannot use s... (by admkrk)
decleration error
 
Write your question here. what would i declare sloop and my x and y intersections as? bool? int? #include <iostream> using namespace std; bool is_L...
[2 replies] Last: Thanks, so much simpler than what i had. (by Dgonzalez1)
How does if/else statements work ?
 
Hello everyone. I'm new in C++ and just discovered this website a couple days ago. English in not my native language so I hope you're not gonna be too harsh on...
[12 replies] Last: Okay ! Well thanks for the help jlb ! Now I can work on some code loo... (by pyro9drumers)
by brenP
Only accept whole numbers for input
 
I am completing an assignment for a class where the prompt states Fractional scores, such as 8.3 are not allowed another requirement was to not allow scores <...
[5 replies] Last: There are three things going on here, get a number, make sure it is an... (by Lowest0ne)
Return Value for calling a function
 
I have to write a program that calls a function. Almost everything runs fine, except for the return part of the function. Up to this point in my class we just u...
[4 replies] Last: Well here is my working code. Thanks for the help guys. #include <ios... (by Endymion)
November 2014 Pages: 1... 4546474849... 65
  Archived months: [oct2014] [dec2014]

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