Beginners - May 2016 (Page 22)

Declaring
 
I am pretty darn new at this, the code i'm writing is giving me two errors and two lines. the errors are on lines 9 and 12. errors state "10:14: error: 'number'...
[2 replies] Last: yeeeess, that makes sense, I was more or less piecing this together fr... (by Grock3121)
Reading a Nested for loop.
 
I'm reviewing for a test and i'm having trouble reading how this outputs, can someone explain to me how its executing using like a chart or something?? like:...
[1 reply] : #include <iostream> int main(){ int i, j, k = 0; std::cout << "... (by helios)
Result of call to toLower(someChar) if someChar='#'
 
Hi, I'm reviewing the entire course material for an upcoming final exam. There is at least one question in my review "packet" to which I cannot find the an...
[3 replies] Last: @naraku9333: Thank you. Just to quote from the link: Return value ... (by moonman239)
Multiple definitions of
 
I am making Player with an inventory of Item objects. in the process of adding and removing items to the Player i get an error that says multiple definitions of...
[5 replies] Last: Oh, I see. I didn't get that. I have fixed it now. Thank you very much... (by Antone333)
by Tonlee
Question about dynamic_cast in C++ Primer 5th
 
#include<typeinfo> #include<iostream> using namespace std; class Base{ friend bool operator==(const Base&, const Base&); public: Base(int i) :base(i){} vi...
[2 replies] Last: Thank you again! XD (by Tonlee)
Attempting to reference a deleted function?
 
I'm still somewhat new to c++ and was working on building a program to create a deck of cards and shuffle them. I'm stuck on the last two lines of my ShuffleDec...
[8 replies] Last: You cannot overload the assignment operator to make it work with const... (by cire)
Help with getting input from .DAT file, putting it into an array all within a function.
 
I was given this .DAT file Volmer 88 90 177 172 180 194 Wilson 191 213 276 288 305 320 Mandich 270 299 302 325 376 401 Pinto ...
[no replies]
Knight's Tour Question
 
Hello, I am having a problem trying to figure out this function. If someone could give a hint as how to continue, because I am stuck. And I tried multiple ways ...
[no replies]
deceleration terminated and
 
I am getting possible use of cChoice before definition and declaration terminated incorrectly #include<stdio.h> #include<string.h> #include<conio.h> #include<...
[3 replies] Last: Lines 55-57: There is still no reason for the }{ here. Line 91: Yo... (by AbstractionAnon)
testing prime numbers
 
I got a homework, i should make a program to check wether a number is prime or not, made up a code, which works but only halfway. So it recognizes prime numbers...
[2 replies] Last: Thanks, that solved the problem ! (by ralfitul)
Object inheritance
 
Hi guys so I made a very simple program and I was quite surprised by the results I'm wondering why twoObject can call the function printIt when printIt does not...
[1 reply] : Line 34: twoObject is an instance of class one. printIt is a public ... (by AbstractionAnon)
do I have to include headerfiles and using namespace std in cpp or not
 
Hi guys I'm wondering for example if I make 3 different classes a main class,a Birthday class,and a people class,now for example first of all do I need to inclu...
[1 reply] : You can do the whole thing in a single file if you like. Your questio... (by Moschops)
help reading from a text file.
 
hello im trying to read from a text file. but does not open the file and does the else statement? does the location of the file matter? or is the format wrong? ...
[5 replies] Last: thomas it was a dumb mistake. when the program ran with would recreate... (by soccerfan12)
Name sorting
 
After complining my program doesn't display result. #include <iostream> #include <string> #include <fstream> using namespace std; // functions prot...
[1 reply] : In sortSurnameFirst(...) / sortFirstNames(...): i++ must only appear... (by coder777)
by evy
To find max and minmum values from pointer
 
hey i just did a small work to find max and min number from an array how can i change the function call to call the pointer and not the array like int *p; p=...
[4 replies] Last: Cool! You're welcome. Glad it worked :) (by MikeyBoy)
Call a variable with local scope inside a method from main
 
Hello I am quite new in C++ programming and have some trouble in understanding the scope of variables. I am reading a lot in my book about accesing and the sco...
[4 replies] Last: Some possibilities: - have the function return the value - make the v... (by MikeyBoy)
Input Validation for Case Switch statements
 
When testing our programs, my professor always tells us to input 123abc or ^Z (ctrl + z) or something along those lines. I understand input validating regular ...
[1 reply] : Try this as a guide: http://stackoverflow.com/questions/2075898/good-... (by closed account 48T7M4Gy)
parrallel array difficulty
 
Ok so I'm having a lot of trouble finishing this program. let me post the abtract so i can explain better. (From the console: Input a Name and age into 2 par...
[1 reply] : You have to add the following statement in your loop(s); if(stu_age =... (by coder777)
Review my code please :D
 
I'm quite new to c++ and made a minesweeper game with ascii symbols. I would like to see what experienced think of my coding style - could it have been more eff...
[1 reply] : Two things: 1. Avoid magic numbers: Instead of e.g. case 0 : //th... (by coder777)
How can I make the void functions into a value returning functions
 
I have this code and it works and has passed all tests. However I need them with a value returning function and not a void function. I'm having a very difficult...
[1 reply] : Take a quick look at this tutorial: http://www.cplusplus.com/doc/tuto... (by chicofeo)
May 2016 Pages: 1... 2021222324... 36
  Archived months: [apr2016] [jun2016]

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