General C++ Programming - February 2012 (Page 33)

SDL Key Hold
 
void handle_keyboard() { Uint8 * keystate = SDL_GetKeyState(NULL); if(keystate ){ var_game_score += 50; } } I can add 50 to var_game_score but...
[4 replies] Last: (once each iteration in your game loop). Did you mean "main" ? Yo... (by hentaiw)
The dreaded round-off error
 
A simple program turned into one of my most sophisticated endeavors. A simple program that reads input (a floating point number) from the user and counts the nu...
[1 reply] : Geez it seems as if the rounding is dependent on the architecture you ... (by nooblet)
C++ coding format
 
Hi people, I am writing a documentation for my assignment, and need to do it in a professional way. My dilemma is, if a line of code, does not fit in the same l...
[2 replies] Last: Thank you my friend you were really helpful. Really appreciated. Regar... (by orangeapple)
THE CODE ABOVE YOU (Bank acct# problem)
 
Code collaboration game! Objective: Solve a problem using C++ with other forum members! Have fun! Test your patience, skills, and ability to work with others...
[1 reply] : int main() {} (by nooblet)
System Utilities
 
hello everyone, i need some suggestion what system utilities i can do using C++ my professor gave as and Project that we need to create any tools using c++.....
[no replies]
Changing lib file name
 
Hello, Im creating dll file and i want to change its name. i do know how to change the dll file name, but i dont know how to do it for the lib file. can ...
[no replies]
Desire Manipulating.
 
In C language we used to write. printf("%4d",1); the output of such statement was 0001. What is the replacement of this one in C++. I know setw to reserve c...
[no replies]
problem with 2 particular outputs
 
Hello, i tried writing a program for two particular outputs but i dont get them after trying them a lot. The two Outputs are given below. Also please tell me...
[6 replies] Last: Okay then, I guess I'll have to literary do one for you.. for(int li... (by hamsterman)
by Aeolus
Comparing a line with next of the same file
 
Hi all, I want to compare first line with next line of a file containg single column. for example a file cotains: NM_1 NM_1 NM_1 NM_2 NM_2 NM_3 NM_4 ...
[3 replies] Last: Store the line in a temporary string . Then go on comparing as Moschop... (by rambo1177)
Listing Memory Regions
 
http://quequero.org/uicwiki/images/Tracur_LordPE_Dump.png I want to do something similar to the above picture but I'm not sure of any Windows API functions t...
[no replies]
Rotating PGM file 90 degrees
 
We are supposed to be writing a function that rotates a PGM file clockwise 90 degrees, passing a multidimensional vector through the function by reference. I'm...
[2 replies] Last: You could express it as a char vector instead, you would probably be b... (by closed account o1vk4iN6)
dealing with struct
 
Hello guys, I have the following code for .h e .cpp of a class. In the .h I declare a struct "metaTable" in which I need to use in the .cpp, but for someh...
[2 replies] Last: Worked, thanks! (by fabiolanza)
Writing a text file into a 2 dimensional array(help!)
 
Ive been creating a little project that lets the user make a path on a graph using a two dimensional array written on a file(intended for use in a later project...
[1 reply] : You want to print the number for bytes? You would need to typecast to ... (by closed account o1vk4iN6)
Overloading the insertion operator
 
Trying to do some state reporting. I'm running into accessibility issues trying to print out objects. The class: class Triangle { private: const Point *vert...
[1 reply] : Syntax is good other than you are missing a semi-colon at the end of y... (by closed account o1vk4iN6)
how to pass sprtinf function as a parameter
 
hi just wondering if someone could give me an example on how to pass a std sprintf function into a parameter of a function thanks. So the function I want it ...
[4 replies] Last: [quote=vietory]Thanks for the replies, Just wondering is it possible ... (by LB)
by Cole99
2d Game
 
I have asked around and saw that I should use something like SDL or SFML. I tried setting both of them up and it is such a long process. It didn't explain it ea...
[10 replies] Last: no (by Peter87)
Keylogger (Not hacking, just learning)
 
Ok, so I have made a keylogger in C++, and it has a single large error. It prints the string that is typed into a text file, however, it does this repeatedly. I...
[11 replies] Last: This is a learning experience for me, and if there is something I can ... (by apache1649)
EOF problem
 
Hi everyone, I am writing a program that counts how many times each of the numbers 0-4 have been typed. the exercise asks that the input will be halted with ^...
[3 replies] Last: Do as JLBorges suggests and test against '0' and '4' directly. Your... (by Duthomhas)
File just wont get created.
 
#include "stdafx.h" #include <iostream> #include <fstream> #include <cstring> #define MAXIMUMPOWER 10000 using namespace std; int main() { ...
[no replies]
C code, but the logic is the same with C++
 
This is C code, but the logic is the same with C++. I can output something, but there is one case I don't know how to do. when the input is \n \n \r \r ...
[no replies]
February 2012 Pages: 1... 3132333435... 43
  Archived months: [jan2012] [mar2012]

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