Beginners - March 2017 (Page 24)

Problem with vector iterator
 
I am currently in a object oriented college course and the assignment is to make the old school asteroids game in openGL. I am using visual studio to do my writ...
[2 replies] Last: Thank you very much... cant believe that I just forgot to add the incr... (by anubisabydos)
for Loop problem
 
So this is the problem I have to work on : Using for loop and if - else statements , write a program that reads 8 integers from the user. The integers can be p...
[9 replies] Last: Can you tell me why when counting the SUM or the FREQ for negative va... (by dhayden)
Grade Calculator Using PHP
 
Below is the code I have used for my php program which is linked to a html file, this program calculates grades, everything is correct, except for the fact that...
[2 replies] Last: hello avavida, It's work with parameters http://localhost/ep/newfile.... (by Cocos)
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 understood the reasoning. It seems that it is preferable to use ini...
[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 happens for the negative values and not positive or zero. Help ...
[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 will be appreciated. header #pragma once #incl...
[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 but all of different problems. The input file looks like th...
[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 close. #include <iostream> #include <iomanip> #includ...
[2 replies] Last: #include <iostream> int main() { const int sentinel = -500 ; ... (by JLBorges)
Recursion
 
Define a recursive function int sum_range(int low, int high) that computes the sum low+(low+1)+(low+2)+⋯+high using recursion. You can assume low≤high. ...
[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 through for possible causes for this error but my code doesnt co...
[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 ? In other words, the function is not in base .h file and it is...
[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 to 360 degrees, as well as the degrees and radians in various...
[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 code... im on a project to write a code of a rocket launch ...
[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 itself instead of in the code. #include <string> #in...
[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 0 1 2 3 int main() { int userNum = 0; int ...
[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)
HELLPPPPP!
 
In C++ : Problem Description: Create NumDays Class to store a value that represents number of hours worked and number of days worked. Must ensure that the...
[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. I've messed around with it a little bit in the addition sect...
[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 passing a value instead for that name. I have tried running ...
[1 reply] : I believe the function should be called : s -> setName(name); s is ... (by kingkush)
March 2017 Pages: 1... 2223242526... 36
  Archived months: [feb2017] [apr2017]

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