Beginners - February 2015 (Page 45)

by EnHo
difrent between c& and c*
 
i have this lecture that in it we have a class named c. in one of it's methods it return c&. what is the difference between c& and c* ? what is c& exactly? ...
[6 replies] Last: Consider this: int *p; // p is a pointer to int int x = 0; // x is an... (by tipaye)
Tic Tac Toe project
 
As an assignment we have to make a program to have a tic tac toe game. But the functions in class seem odd and the teacher hasn't really explained or made me mo...
[no replies]
Substitute cin with "getline" when storing values for operation.
 
So I am still learning about C++. I'm trying to substitute cin with getline. So instead of storing values using cin, I use getline. And it doesn't work, can you...
[7 replies] Last: I just want to warn you, stringstream constructor is painfully slow. I... (by MiiNiPaa)
copy constructor
 
Hi, when passing a class parameter to a function using a const lvalue reference, am i required to provide a copy constructor for such a class to be used in argu...
[7 replies] Last: @MiiNiPaa thanks a lot for the insight, so that means i should retain ... (by closed account SECMoG1T)
Grid
 
I've been messing around with this for a couple of days now. I'm trying to generate a grid of 0s and move a 1 around with the numpad. the grid generates just fi...
[1 reply] : You want AND && not a comma in your "if...else..." checks.... (by Computergeek01)
by Dkob1
Switch Statement to make Menu
 
I think I was supposed to use swich statement to construct a menu but I did it like this, how would I do it using switch and members of <iomanip> ? #incl...
[12 replies] Last: @Jaybob: I'm trying not to give out direct solutions. =/ How is he ... (by Disch)
by duri93
Class inheritance and function overloading
 
Hi! I am quite new to c++, and I have a little problem with class inheritance, function overloading and then calling the right function (is it polymorphism?). ...
[3 replies] Last: A nice succinct explanation here: http://www.tutorialspoint.com/cplusp... (by mutexe)
by Opera
How to print text in multiple rows and columns?
 
I am new to programming and I wonder if someone could please help me with a program that asks the user to input number of rows and number of columns, and it sho...
[2 replies] Last: Thank you so much for the help MiiNiPaa. I thought that I had to strug... (by Opera)
Mean using For loop
 
I have been tasked with finding the number of arguments, the mean, and variance of a vector that a user inputs. So far I have been able to figure out how to che...
[1 reply] : http://www.cplusplus.com/forum/beginner/91285/ (by rafae11)
by GOPI56
Help Me,My Program is not working.
 
I have written a program which creates student record with structures. program so that it will display a menu for the user to choose either to; Add student reco...
[1 reply] : But the program is not working Can you expand on this a little?? ed... (by mutexe)
Beginner, Bool in header file?
 
Hey guys, absolute beginner here. I'm having trouble trying to implement a section of code in a program we are working on at school. It keeps giving me an error...
[1 reply] : Functions certainly can be defined in header files. The only thing I ... (by Disch)
rice on chess table // long double way too small
 
There is an old story that the emperor wanted to thank the inventor of the game of chess and asked the inventor to name his reward. The inventor asked for one g...
[1 reply] : Whoops sry for this i see that i didnt change int rice to long d... (by etrusks)
nested for loops
 
so i need to make this: (the pipes line up with the "+" signs) +===+===+ | | | | | | | | | +===+===+ | ...
[2 replies] Last: oh my god! thank you! (by captSlo87)
How to read in strings into multiple arrays
 
So i have 2 string types 1 for last names and 1 for first names and i also have an int type for ages and the user input would be a full sentence and it would lo...
[2 replies] Last: Yes that's what i needed thank you! (by agamatr)
recursive functions?
 
hello everybody, today I performed an experiment with a "recursive" function, my code is below. when I run the program I get a segmentation fault, I was wond...
[3 replies] Last: It's easy to forget the base case of a recursive function as you have ... (by dhayden)
Need help with Switch Statement!
 
I just started learning how to use switch statement. Could u guy help me complete this code pls? #include <iostream> using namespace std; int main() {...
[3 replies] Last: bool invalidInput;// true if input is invalid, false otherwise I fin... (by dhayden)
by zyhro
Loop statement
 
how to get the sum of grade using while loop, do-while loop, for loop. i need this for my midterm exam. please help me. "ASAP" example: 1st grade 88 ...
[1 reply] : What do you know about those loops? http://www.cplusplus.com/doc/tutor... (by keskiverto)
Hello c++ people!
 
I need assistance. I have taken a class online, because my school did not have programming options, and I am in over my head. I have a little experience with VB...
[1 reply] : Many people are here to help. Create a thread on your homework proble... (by closed account D80DSL3A)
by kurno
formatting
 
delete this thread please
[no replies]
Returning value to pointer argument
 
I have a question about pointers in C++. I am currently making functions that use pointers to (optionally) return extra information that cannot be contained in...
[2 replies] Last: So much sense! You are the man! Thank you! (by srwilton)
February 2015 Pages: 1... 4344454647... 52
  Archived months: [jan2015] [mar2015]

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