General C++ Programming - September 2014 (Page 2)

Rocket
 
Hi I just recently got this program for my class, and I'm having a hard time understanding how to even start the program itself. We want to use a loop to output...
[9 replies] Last: Thank you all for the help. I got it figured out now I appreciate it. ... (by ISeeWaffles)
Problem with a program that prints a discounted product.
 
So I need to make a program that reads distance and number of days of a person that is buying a ticket. If distance is greater than 1,000 kilometers AND the per...
[2 replies] Last: finished it. #include <iostream> #include <conio.h> using namespac... (by fercasti)
Finding the largest and smallest integer in a set using while loop
 
I've been working at this for awhile and it seems like it should be correct but it isn't giving me the desired output. Here's my code. #include "stdafx.h" ...
[4 replies] Last: #include "stdafx.h" #include <iostream> #include <fstream> #include <... (by closed account 48T7M4Gy)
c++ - where is the the c++ string include file?
 
i'm trying find the C++ string include file. but i only find the string.h file(it's a C strings). can anyone advice me?
[11 replies] Last: Peter87: yes i know that... but i'm trying avoid that. MiiNiPaa: so i ... (by Cambalinho)
When to declare a member function as 'const'
 
I do not know the correct word for it - but I am trying to describe the unusual situation where you declare a class member function with this format: bool...
[3 replies] Last: Many thanks chaps! Those examples do clear up a lot of my questions -... (by Gemman Aster)
Strange run time error
 
It's been quite sometime since I last coded in C++ perhaps half a year ago. Anyway, as far as I can remember these are the causes of run time error : too deep ...
[4 replies] Last: Oh yeah I misread what happened on line 6 Thank you for your guidance (by rmxhaha)
Please HELP!
 
So I need to write a program for my cse 100 class. I will provide all of the instructions, although I only need help with part 4. I will also provide all of the...
[1 reply] : Please do not double post. It clutters the forum and spreads attempts ... (by MiiNiPaa)
Variable not functioning properly
 
#include <iostream> using namespace std; int main() { int n, x, blanks, rows, irow, crow=1, a, y, z; cout<<"Enter a positive odd number: "; cin>>n...
[1 reply] : In your code: cout<<a%10; //This outputs 1 in the end of 321. a == 1... (by MiiNiPaa)
beginning SFML
 
I was thinking of using SFML for creating games. One of my main purposes was to create a very simple graphing calculator, and to finish some of my games. I was ...
[1 reply] : What are the drawbacks of SMFL Perhaps overly simplified? How woul... (by Stewbond)
Simple Program w/ Menu
 
So I was assigned a three-part program a few days ago and I am having problems with my output. The assignment was to do the following: 1. Create a neat menu th...
[18 replies] Last: No I am referring to this snippet from the link I provided above. S... (by jlb)
How do i write this equation for C++?
 
BMI = 703*weight / height^2 how i thought to write it was: (703 * getWeight / pow(getWeight, 2.0) which is wrong. Any help with this would b...
[3 replies] Last: Ok, that acually works now, I had it actually written as above with ge... (by banithel)
Stuck with this code
 
Write a program that calculates the total grade for N classroom exercises as a percentage. The user should input the value for N followed by each of the N scor...
[4 replies] Last: Oh, I already got it working. Thanks for your comment tho, it really h... (by techtris)
Working with a char array
 
I am working with a character array containing an equal number of vowels and consonants organized randomly. My goal is to reorganize them so that they alternate...
[5 replies] Last: I had some time to play with this one today, thought I would share. T... (by Lowest0ne)
Angular Movement
 
i'm making a spaceship game. will be a shooter game. but i need to make the ship move as the angle of it. I want the ship to go to where is pointed. Confu...
[1 reply] : cos/sin take the angle in radians, not degrees. (by Disch)
Calculating the Area and Perimeter
 
Hello everyone. I am having trouble with my C++ program. My program asks the user to enter any number greater than 0 and less than 20, and if the user enters an...
[4 replies] Last: I know they are different variables, that is why I declared them in ea... (by suko123)
Function Parameter Scope Issue
 
My errors are at the end of the program in two function calls within the definition of the InsertByValue function. g++ does not seem to recognize NumArray as a ...
[1 reply] : There is no variable called NumArray in your InsertByValue() function,... (by Zhuge)
AVL-tree calculate height difference
 
I looking for method which can give me the height difference of an AVL_tree. The method i come up with up now is this. int avl_tree::balance(node* pointer) {...
[4 replies] Last: Take a look at the way I did it here: http://www.cplusplus.com/forum/... (by Smac89)
Binary and DataType
 
Here are the binary values for the address in memory for an integer and a double.. Can you tell what dataType they are by reading the binary address? Is there s...
[6 replies] Last: > But anyway, yes, a double can sometimes exist at any memory position... (by JLBorges)
Nothing showing OpenGL 3.3
 
To be honest I'm a total noob at the newer OpenGL versions... after finally convincing myself that I should give up the depreciated versions I've been running i...
[3 replies] Last: I fixed that, and it still doesn't do anything. My code now: void C... (by Avilius)
by dkaip
wchar_t and reading unicode strings
 
Hello. With this code by helios(thank you) all in UTF8 are ok. But now i must use ranges from U+10000 to U+17FFF There is an update code? Thanks very much. ...
[14 replies] Last: wstring giveWStringFromASCII(size_t i) { return StringToWString(Unico... (by helios)
September 2014 Pages: 1234... 28
  Archived months: [aug2014] [oct2014]

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