Beginners (Page 57)

by AlanG
Why is initialization preferred to assignment?
I know this is not a new feature of C++11 but it has been enhanced. And I've never quite understoo...
[10 replies] Last: #gunnerfunner: By "non class member" I meant a member which was not a ... (by AlanG)
First value skipped when trying to sum in for loop
The first negative value that is entered is not counted either in the sum or the count. It just happ...
[2 replies] Last: Have a closer look at for (y = 0; x <= 7; x++) Also have a look at... (by Thomas1965)
classes string print out
I am getting the address to print out but i want it to return the string that it was given any help ...
[1 reply] : Hello rezy3312, In main lines 12 - 14 obj.function1 is not a functi... (by Handy Andy)
Reading in chars including blank spaces but not new line
I am trying to read in a text file of characters including blank spaces. I've tried a few solutions ...
[3 replies] Last: I fixed the problem, the getline needed to be moved outside of the sec... (by parkhill)
Do while sentinel
Hi How do I add a sentinel using a do while loop here so that when I enter -500 the program will c...
[2 replies] Last: #include <iostream> int main() { const int sentinel = -500 ; ... (by JLBorges)
Define a recursive function int sum_range(int low, int high) that computes the sum low+(low+1)+(low+...
[4 replies] Last: I think its if (low == high) return low; //the +1 was handled in the ... (by jonnin)
fstream with array error
i tried to read/write an array to a file but gotten the "no matching operator" error. I've read thro...
[2 replies] Last: the array courses is declare in a class called registration. I've als... (by gambette)
function outside of base .h file -BUG!
Is there any way you can include a function inside your .h file that is not int the base .h file ? I...
[5 replies] Last: Yes, if the problem is that you're calling calculate_score() from prin... (by Peter87)
Program that prints values of sin and cosines
I am working on an assignment for school that prints a table with the values for cosine and sin up t...
[3 replies] Last: Also, don't use doubles in a for loop - their representation is not ex... (by TheIdeasMan)
a rocket launch sound
please any body to help me on how to add sound or go to the extent of adding a sound in a written ...
[3 replies] Last: If you are using a Windows computer you might be able to use Beep(). I... (by lastchance)
Class: Setting name in console
I have this code here but I would like to know how to set the name,lastname and phone in the console...
[1 reply] : Use std::cin to get input from the console. std::string first_name; ... (by integralfx)
a guessing game to give only 3 output
hello everyone please have been given an assignment to write a code to guess exactly 3 times
[6 replies] Last: You're welcome. Hope i explained it well enough. If youre still stuck ... (by kingkush)
Adding White space
Hi guys, how do I add white space for every count? for example if userNum = 3 then it should print ...
[4 replies] Last: #include <iostream> int main() { int userNum = 0; std::cout ... (by JLBorges)
objects and instances
Can someone explain what is an instance of an object?
[4 replies] Last: you haven't shown FlightReservation.h but if an instance of this type ... (by gunnerfunner)
In C++ : Problem Description: Create NumDays Class to store a value that represents number of ...
[2 replies] Last: class numDays { private: int numHoursWorked; int numDaysWork... (by kingkush)
Switch to Function
Hey programmers, for this code what I'm trying to do is rewrite this program in terms of functions. ...
[1 reply] : You must put a text file of all the data you need into your project fo... (by kingkush)
Help doing a class function
Hello all, I am trying to write a function that enters in a new name for the student name Po, and ...
[1 reply] : I believe the function should be called : s -> setName(name); s is ... (by kingkush)
Need Help With If Statement Program!
Hello, I am struggling with getting the correct output from my program, here is the problem followed...
[1 reply] : #include <iostream> #include <iomanip> int main() { const int MA... (by JLBorges)
by GG96
Pointer to Structure of Arrays
Hi guys, I need help with this programming assignment. I am supposed to modify a previous program wh...
[5 replies] Last: I tried using the dot operator, but when I ran the program it gave me ... (by GG96)
Separate files questions
Code::Blocks 16.01 After trying to learn how to separate my program into files (after watching so...
[2 replies] Last: Thanks for the reply. I didn't have any issues or errors (except if I... (by volTron)
Pages: 1... 5556575859... 68
  Archived months: [feb2017]

Cannot post in this page. To post a new message, go to the first page.