Beginners - August 2015 (Page 22)

Constructor and object declaration
 
Is the constructor called whenever an object is declared or is there an exception when pointers are used such as below? Box *ptrBox;
[2 replies] Last: Thank you! (by hemlock)
Printing paragraphs using random strings (Style)
 
So my program does what it's supposed to do. I'm just wondering if there is anything I can do to make it look better. #include <iostream> #include <cst...
[1 reply] : The four if-file-not-opens could be combined into one with || if(... (by kevinkjt2000)
by TommyL
Separate Class File Help
 
I SOLVED IT. GOT IT BOYS EHEHE NO NEED ANYMORE So I need help on learning just exactly how theses separate classes work. This is the code without separate cl...
[1 reply] : Okay I finally messed around enough to get what's wrong with this now.... (by TommyL)
Help please
 
how generate a Factorial Chart from 1 to N? N = 5 N = 9 test your program. sample run is Enter a value for N: 6 Factional chart from 1 to 6 1! = ...
[9 replies] Last: @supernoob thank you for the answering you're right :D but i solve thi... (by janineee29)
Constructor help (1,2)
 
How to i set the name of the employee? I dont understand how to use the string. The book only shows examples of integers. This is the assignment. Write a class...
[23 replies] Last: Thanks for your help! I really really appreciate you taking the time o... (by kingkush)
by fguy
string and size()
 
Greetings. The book I am reading ( c++ Primer ) says that the size() function of the string type returns a value of type string::size_type . If that is true, w...
[7 replies] Last: It's also worth pointing out that using the appropriate size_types ins... (by fguy)
For loop not incrementing?
 
So, yes, this is technically a homework question but I'm on the right track, I just don't understand why my for loop isn't incrementing the way it should. All i...
[2 replies] Last: No wonder. I'm an idiot lol (by JoshuaCrotts)
Values in an Array
 
Hey guys, I'm working on a simple little game thing. I've asked for help on this forum before and received it but I'm stuck again. In the game, a map is drawn ...
[1 reply] : It is just a pain and disincentive to help if the questions are unclea... (by CodeWriter)
by DannyL
while loops in switches?
 
So my code is pretty basic, just simply choosing a difficulty level in a game, however even that I can't even manage to get right, my problem is occurring with ...
[11 replies] Last: You also didn't get rid of line 5. (Please read the link to see why it... (by Duthomhas)
Reading number of lines from a text file.
 
Whenever the code runs, the number that is returned is a gigantic negative number. Here is the output: "There are -1077611113 Lines in the file." #i...
[1 reply] : This is because you never initialize numberOfLines in getLineNumber().... (by koothkeeper)
[Homework help] Stuck at getData
 
my English is not that great so the teacher ask to not store the input and i do not know how because either way it would do and mess up the rest of the file.....
[4 replies] Last: her are the instructions. Purpose: Analyze and summarize the data col... (by vorkvins)
undefined reference to function?
 
Hi so I'm new to C++ and I wanted to try calling a function called "bark" in my main function defined in another .cpp file. I created a header file to prototype...
[7 replies] Last: Wow I'm so dumb haha. Thank you MiiniPaa you solved my problem! (by helios103)
loop to continue to let people to work until they chose to stop
 
I need my loop to continue to let people to work until they chose to stop themselves. Without crap canning what I got how do I keep the loop going instead of en...
[no replies]
by beeSea
possible array function question...
 
I have a program that I am writing in c++ for a class project. SEE BELOW my problem is it is not giving me a chance to get the word correct even when it is corr...
[3 replies] Last: ok after looking around some more on references and the '&' I figured ... (by beeSea)
min/max, mean, median. (1,2,3)
 
I have a complex task and I am struck with it. 7.84626,0.00121498,?,?,?,?,0.595974,1722821,40877036,73,601,130,45,73,1481,1479,2153,4922.35,116792,6.13849,7....
[42 replies] Last: I would store the results in vector(s). That keeps calculation separat... (by keskiverto)
Getting exponential instead of zero in the output.
 
In the following simple code, I should get a zero in the output console but instead I'm getting a value 5.96046e008. Can someone please help me with this? #i...
[2 replies] Last: 5.96046e-008 is almost zero. The size of the error is about what you... (by Peter87)
by mykds
Problem with fread?
 
Hi there, I've got a prob with the following code. I already spend several hours fault finding but couldn't fix it. struct Std { float sp; float sv; }; S...
[5 replies] Last: I always thought when I create an Array like Array it gives me an A... (by ajh32)
diamond project
 
pls help me with my project i am a beginner in c++ how can i do this image ++++++++++ ++++xxx++++ +++xxxxx+++ ++xxxxxxxx++ + xxxxxxxxxx+ ++xxxxxxxx++ +++xxxx...
[5 replies] Last: Letter "X" is substitute for blanks When you post here, there are fo... (by keskiverto)
by lune
How do I force users to input integers only in my program? (1,2)
 
Hey I'm really new to C++ and I'm need some help! What is an efficient way to force users to enter only integers within a certain range(e.g. 1 to 10)? int my...
[23 replies] Last: I can't see any need for strcmp and cin.ignore() is not complete witho... (by closed account 48T7M4Gy)
by berkxz
Thracing the nested loops with inner if and inner loop wit inner if
 
Hi! I'm having a problem reading through an outerloop nested with inner if and inner loop and nested with inner if again in the inner loop. Please help me, how ...
[1 reply] : It would be nice, if you did add systematic indentation to your code. ... (by keskiverto)
August 2015 Pages: 1... 2021222324... 28
  Archived months: [jul2015] [sep2015]

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