Beginners - January 2013 (Page 15)

by ash159
Function to replace getch()
 
I want my program to pause in between and wait for user to press any key in order to continue. I don't wish to use the getch() function. I neither want to use ...
[4 replies] Last: I know how to hold the screen and wait for user to press key in order ... (by ash159)
basic compound interest program
 
Sorry guys, I am very new to programming. For class we have to make a compound interest calculator to calculate future value after 4 years. A buddy of mine help...
[3 replies] Last: No prob. (by guatemala007)
[Solved] Unexpected close and other issues
 
Three semesters ago I took a C programming class where I had to write a program (which worked completely) similar to this one and I am currently learning C++ (o...
[2 replies] Last: Wow, I can't believe I missed that! Thank you so much, it was botherin... (by Goldeagle3492)
cant put a picture in
 
#include <cstdlib> #include <iostream> #include "SDL.h" using namespace std; int main(int argc, char *argv ) { bool running = true; if(SDL_I...
[1 reply] : Only problem I can see is that sdl_Flip should be SDL_Flip. (by Peter87)
value assignment with cin
 
I'm having trouble with this section of my code. case 2: cout<<"You drive the knife deep into the zombie's temple and watch it fall to"<<endl; cout<<"t...
[1 reply] : If knifechoice is a string then you need if (knifechoice=="yes") ot... (by TheIdeasMan)
const makes overload faster?
 
Hello, I'm working on a class that overloads operators and I was told that by adding const in the parameters and at the end of the declaration I could make...
[4 replies] Last: @Friso1990 - that's right. (by JockX)
by CamK
Creating a timer.
 
I'm a novice programmer in C++ and I'm wondering how to update a value of an integer periodically. For example, increasing the value of an integer by 10 every 5...
[1 reply] : #include <iostream> #include <ctime> int main () { // http://www.c... (by JockX)
by Ch1156
Please help with my program
 
Im making a file destroyer and i need some help because im a little stumped. I want the program to find ever letter in the lowercase array and replace each lett...
[15 replies] Last: Uhm I don't know what to say, because in the first one you said explic... (by S G H)
::break
 
Hi all, say I have this code: for ( ; ; ) { for ( ; ; ) { if ( /* some condition... */ ) { ::break; // I want to break from the ...
[6 replies] Last: The other thing to try - put the code into a function and return a val... (by TheIdeasMan)
Gymnastic scores
 
g
[1 reply] : I see two small errors. 1) In C, array indices start at 0. That means ... (by toum)
Arrays
 
My program stops after it lets the user input a number. Please help. I know it probably has something to do with my arrays...? #include<iostream> using namesp...
[2 replies] Last: Thank you :) (by mezzoforte)
vse2012 - cout is undefined
 
Hi there, I've run into a strange error using vse2012 to run some simple c++ code and I'm hoping someone here can help. This is pretty weird, at least to me, so...
[4 replies] Last: thanks for the help, i should have noticed that using namespace std ... (by staticwarp)
Fstream header file error
 
Hello, I have been testing out the fstream part of the standard library. I wanted to make a header file, so it is easier to use, so I wrote the file, and a test...
[5 replies] Last: (So, fileRead.open(*fileName, ios::in);) No, not unless fileName is... (by Branflakes91093)
Error with #include <iostream>
 
I'm having problems with this code - // my first program in C++ #include <iostream> using namespace std; int main () { cout << "Hello World!"; return 0; } ...
[15 replies] Last: Okay thanks! (by DuckkTV)
Class problems
 
I have been having a problem with my code for quite a while now. It started with trying to reference a const static int of a class in the same class. It caused ...
[no replies]
Access to object members
 
Here is the scenario, I have 2 separate classes, 1 called player and 1 called camera. I need a function in a camera object to have access to a variable t...
[2 replies] Last: I need a function from a camera object to get the player object's x, y... (by sacache)
va_list with templates
 
Hi all, I have this code: #include <iostream> #include <cstdarg> template < typename T > void print( int numArgs, ... ) { va_list vl; va_sta...
[8 replies] Last: ah, thank you! (by Fransje)
Project Euler - Problem 14
 
It has been a while since I last posted on this forum. But I came across a problem once again: I have been trying to solve Problem 14 of Project Euler ( ht...
[7 replies] Last: I didn't notice you posted it at the same time, sorry about that.. Th... (by simpleasy)
writing to .txt file
 
i have written the following program to get a solution of algebraic equation using newton raphson method. i would like to print the iteration results to a text...
[2 replies] Last: hey thank you chervil after doing the change that you have mentioned, ... (by varuniitb)
Help w/ little program.
 
Hello everyone, I have a problem with my formula. I am trying to display the smallest of 3 numbers. It works ok when I do something like 1 2 and 3 but when I do...
[3 replies] Last: you can do the same thing with less rows. #include<iostream.h> int m... (by powerbg)
January 2013 Pages: 1... 1314151617... 52
  Archived months: [dec2012] [feb2013]

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