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

SDL copy surface problem
 
I am working on a resource manager to store my objects/images in memory instead of reading from the HD everytime an image is loaded. The sdl site said that usi...
[1 reply] : Sorry, apparently I needed to use this method instead. 1 SD... (by closed account zwA4jE8b)
Vector Of SDL_Rect
 
I wrote this : //Sprite Storage std::vector< SDL_Rect > char_frame; How can I push back new object of type SDL_Rect with all its variables set to...
[2 replies] Last: This also works char_frame.push_back(SDL_Rect()); (by Peter87)
by mweshk
How to prompt to enter details of 5 users and output them
 
Hi good friends. I am stack here please help. I want to write a program that prompts a user to enter details of up to 5 students the displays the information ...
[9 replies] Last: np (by Jikax)
by oonej
Overload Operator Recieving Segment Fault
 
I have a function that checks for a specific parameter, if that parameter is incorrect i need it to send a null pointer or something to an overloaded ostream op...
[4 replies] Last: Thanks, didn't even think of doing it that way :) good call (by oonej)
How to generate an auto ID (or Auto Number)
 
Hello, This code is for (hospital management system). This code allow you to add patients. There are two types of patients. which is: 1. Normal patien...
[1 reply] : #include "stdafx.h" #include<conio.h> #include<string.h> #include<... (by general07z)
New to arrays & stuff, basic so help is appreciated!
 
Exercise 5.1.3. Write a program that prompts the user for each of seven values, stores these in an array, and then prints out each of them, followed by the tot...
[1 reply] : The loop for collecting data would eliminate the need for all of those... (by MrHutch)
BLOCK_TYPE_IS_VALID
 
Please help me I'm a new programmer, so I am not strong in C++ This is my code // Chuong2_bai14.cpp : Defines the entry point for the console application. /*...
[2 replies] Last: tks so much ^^ (by hungduongn)
Storing a nibble (4 bits) at a memory location
 
2 days and no results. What I am trying to do here is store 4 bits (representing decimal numbers 1 to 15) at an effective memory address. As such a byte in memo...
[8 replies] Last: Thank you oonej and everyone else for your input. I really appreciate ... (by vasiqshair)
GCD/LCM function problem
 
I'm writing a program that calls a function that calculates and returns both the GCD and LCM of 2 integers. I am having an issue with what's going on in the fun...
[5 replies] Last: Ok, I figured out how to come up with the GCD, but now the LCM isb't c... (by sexynerd)
Open a file within a folder
 
fin.open("..\Characters\char_jack.DAT",std::fstream::in); It couldn't open it...please help.
[1 reply] : Tried this and worked...thanks everyone...still need kind like ../fold... (by hentaiw)
2d array map(help)
 
Im having a problem with my 2d array in which you can move around in. The array is read in from a text file and then the character is able to use the "w" "a" "s...
[3 replies] Last: It's simple: MAP.H: #ifndef MAP_H #define MAP_H #include <string> c... (by coder777)
by jk5440
norminv matlab function in c++
 
require c++ code for norminv matlab function Normal inverse cumulative distribution function
[12 replies] Last: got it thank u for all the help matlab chol uses the the LAPACK su... (by jk5440)
Possibly out of bounds? please help
 
So I have already turned this homework assignment in before knowing that it wouldn't work sometimes. My problem with it is. When I type any number to generat...
[4 replies] Last: That is because there are parentheses around size right? i didnt even ... (by cullenT)
debug assertion failed!
 
this program scans a text file to see if words exist in it. this is not the whole program, so the random characters are not relevant to the program yet, but the...
[2 replies] Last: thank you so much!!! (by ramus313)
help! use stack operations in c++ program
 
guys please help me! can u teach or make a program that uses stack operations like push/pop, empty, size, top in one whole program.. the example of this program...
[no replies]
by s3rr00
Repeat a Function in main()
 
I am trying to make it that as soon as a void is finished and goes to the main() function it goes back into the void. Is this possible? I am trying to make a li...
[7 replies] Last: i simple way to write that would be using a bool(true false statemnet)... (by Need4Sleep)
reading text file help?
 
here is my code, there are around 45,000 words in the text file, it doenst work quite right. ive also included the txt file im using in the attachments ...
[3 replies] Last: vector<string> words; string word; fstream file("words.txt"); whi... (by Hippogriff)
Rubbish Character When Return ?
 
string result = str.substr( find_array1 + 1,find_array2 - 1 ).c_str(); cout << result.c_str(); return result.c_str(); } My function const char* ...
[2 replies] Last: Wow.Cool !!! (by hentaiw)
'Multiple definition of' error
 
Hello. I am having an issue in my code that I did not have yesterday. When I try to compile my code, I get about 20 multiple definition of '%s'', my variable an...
[15 replies] Last: Replace the definitions in DOTA.h with extern declarations: extern B... (by cire)
help with this project please!
 
look under the options function and try to turn off the random colors... that is where the porblems are. i want to be able to turn off random colors within the ...
[8 replies] Last: Line 175. Find is your friend. In this code: void disable_color(... (by cire)
February 2012 Pages: 1... 1819202122... 43
  Archived months: [jan2012] [mar2012]

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