General C++ Programming - November 2012 (Page 42)

What's the easiest way to restart a game besides using setters?
 
When I need to restart a game, the only way I know how to initialize variables to defaults is by using setters. Is there an easier way to do this? Thanks
[2 replies] Last: Thanks (by dtaqee88)
scrolling screen in sdl/my own engine.
 
okay I think I am spazzing out here but this should work to make my background scroll vertically yes? or am I missing some things >.< I can provide my d...
[no replies]
Switch statement not executing in proper order.
 
Hello, my switch statement is not responding to what the proper input should be and it's switching around my menus. I have no idea why it's doing this, and I'm ...
[5 replies] Last: Line 53 of mainMenu, you have no break statement after you call hist... (by AbstractionAnon)
by noo1
How to print (display to screen) an array of struct
 
I actually have two problems (maybe more?) here. I think the more difficult one is that I don't know how to display the information in the array of struct ...
[10 replies] Last: I am getting the correct output! I have no idea how clumsy/clutzy my ... (by noo1)
by else87
Periodic Table Program
 
Hi, I'm attempting to write a program "mapping" the Periodic Table of the Elements. I want the user to be able to input any data on an element (such as name, s...
[3 replies] Last: Create a class to represent each element. class Element { strin... (by AbstractionAnon)
lazy foos tutorial (link provided) i cant see what might be refreshing the screen
 
http://lazyfoo.net/SDL_tutorials/lesson16/index.php i have been experimenting with changing the intiger that would paste the specific clip to the offset in r...
[7 replies] Last: balls, is there a remove surface function? dont answer that im going t... (by devonrevenge)
double pointer help
 
mapprinter = new (nothrow) char [mapxc*mapyc+mapyc]; if (mapprinter==0){ cout << "error"; } for(int i=0;i<mapyc;i++){ map = new (nothrow...
[10 replies] Last: @xerzi yeah they were documented in one of the old articles on using... (by LB)
Linked list with multiple data elements per node
 
Hi, I have a conceptual question, because I am completely stuck on how to write a program. I need to write an address book that holds contacts' names, birthdays...
[1 reply] : Post removed due to reply timeout. (by closed account D80DSL3A)
by Prog24
I need to write a program and can't seem to get it
 
My job is to read in a line of data from an input file, remove all white space and punctuation, then check to see whether or not it is a palindrome. A palindr...
[9 replies] Last: You've never used the standard input stream before? It's just like any... (by LB)
Dissecting a string for data
 
Hi guys. I have a project for my C++ class. It requires the building of a very basic drawing program that takes inputs to the program from a txt file and cr...
[no replies]
c++ Dijkstra's algorithm
 
I can't seem to get the order correct on this program, it uses an algorithm to convert infix to postfix: ItoP.cpp #include "ItoP.h" int main() { string inp...
[no replies]
JNI problem
 
Hi, I have a C++ JNI problem. Below code doesn't compile in VC++ (VS2010). It's part of a C++ dll, that's called from a Java program. #include <jni.h> ...
[5 replies] Last: nobody ? This is "TestJNIString.h" /* DO NOT EDIT THIS FILE - it is... (by Kitesurfer1962)
RETREIVE OPTIONS CHAIN PRICE (NOT STOCK PRICE) OF A STOCK
 
Hi everyone, My only problem is only to get the Options Price of a Stock, not the Stock Price. I still dont know which server to connect to and which querry sh...
[5 replies] Last: Bump* (by supermansaigon)
structers problems need to fix
 
i have done with this structure but i have some syntax error idk how fix it the errors start from line 22 idk what kind of error it is becuase the requirement...
[1 reply] : i<ListMovies .movietype i is an int. movietype is a string. Y... (by Moschops)
by reyg
Change Chart Type in MS Visual C++ Express
 
Hello Experts, I am using MS Visual C++ 2010 Express edition. In the Chart component, is it possible to change the chart type? The default is a column chart ...
[1 reply] : Yes... You van change the type for every serie... so there would be a ... (by Jikax)
Cant see variable data !!! Please HELP!
 
Using the below code, I am running debug. I want to see the values as I enter data so have put several breaks in place. Once I enter a few values, I look at 'Au...
[3 replies] Last: pogrady, foodname is a std::string so calling operator!= with "\0" wil... (by LB)
Make plots of simulation results
 
Hi, I have run a simulation with C++ (thanks to the help of several guys in the forum). My simulation results have some vectors each including a big number o...
[5 replies] Last: MathGL (by Moschops)
by georgi
I need help
 
Write a program that reads the coordinates of three points from the standard input and calculates the area of the triangle defined by them. The coordinates are ...
[6 replies] Last: Can you do it please. I can. But I won't. (by ResidentBiscuit)
c++ help storing '\n' in char array
 
the problem is that it only shows the first line i don't thing there is anything wrong with my formula what i am trying to do is to cout the whole map f...
[4 replies] Last: ahh i see i misscalculated all i had to do was swap mapprinter[(i+1)*... (by ToLesto)
by Eyad
HELP plz SIMPLE
 
#include<stdio.h> int main(void) { quantitiy; float wt_bar, wt_total; printf("Enter the quantity of candy bar"); scanf( ); printf("Enter the weigh...
[4 replies] Last: Alright now translate that to C. http://www.cplusplus.com/reference/c... (by ResidentBiscuit)
November 2012 Pages: 1... 4041424344... 51
  Archived months: [oct2012] [dec2012]

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