General C++ Programming - January 2012 (Page 8)

Using the same method for several classes...
 
Lets say I have three clases, I use each one for a specific window in QT, but that's not really what I need you to know... I have 6 files... Class1.h Cla...
[6 replies] Last: webJose said: But note that if it is only show(), you pretty much ... (by Computergeek01)
Private Class Member not Initialized
 
Hi Guys, I have another problem, I have a class that is used for displaying a main menu in a game that seems to be having issues with it's privatized member...
[2 replies] Last: Ok, I replaced free with delete . I also fixed my own problem,... (by snow 56767)
a very quick question about "this"
 
Hi guys! consider: class S {public: S(S&); void operator= (S&); ~S(); S& W() { //some code return *this; } ...
[8 replies] Last: aw sorry,you were totally right,it was the copy constructor,turns out ... (by MasterAsh)
Recipe scheduler
 
(cliffs at the bottom) In a few days I'm cooking for 15 people and the meal itself involves making 6 mini-meals (6 different italian dishes). So while i was wr...
[5 replies] Last: @Web Yeah fully aware of that but it was just to keep things together ... (by Muckle ewe)
help with box
 
I have written this program for my cpp project.. but i want to make it more nice... how was a box or something. here is the coding for the program: http://past...
[1 reply] : even after clicking the NEW REGISTRATION in the program.. the screen d... (by User 76966)
Error C3861: 'DrawTrapezium': identifier not found
 
I had the function 'DrawTrapezium' in which I declared all of the variables, but after moving them into parameters I get this error. Here is the code: (the 2 se...
[3 replies] Last: Thanks :) And I will remember for next time cheers. (by brendanb581)
Weighted sum modulo
 
How to calculate this term: 11 minus the weighted sum modulo 11 of the nine first digits I need the method also. Friends please help me............!
[1 reply] : I need the method also. Have you tried Google? (by kbw)
Help on C++0x random generator
 
I had the following code: #include <random> #include <functional> #include <ctime> double GetRN(double min = 0.0, double max = 1.0) { // u...
[3 replies] Last: @Cubbi, your solution really helps!To make the variable "engine" stati... (by lipatrick)
by han613
WHAT AM I DOING WRONG?!! help!!
 
hi! im suposed to write a function that performs crypto "encryption" of a string. for example char 'a;, which is the first in the alphabet, becomes the last let...
[2 replies] Last: string -'a'=temp; Is this a typo, should be reversed. Change the ||... (by Muckle ewe)
Linker Error
 
http://pastebin.com/yYBmawsS The code if giving me the error of [Linker error] undefined reference to `QuickCG::screen(int, int, bool, std::string const&...
[3 replies] Last: Thank you for the link, I very much know it is not updated, and likely... (by closed account GbX36Up4)
Where to go next - Game Development
 
I have a firm knowledge of C++ now and I would like some direction to go to study more into Game Development. Any good books people could recommend? I'm intere...
[1 reply] : Welcome to the wonderful world of game development! First of all, if y... (by Pravesh Koirala)
Reading file and splinting according to format
 
Dear friends, Please the bellow code . I am trying to read the file ie /proc/net/wireless and printing this is working but I want only specific t...
[5 replies] Last: Consider using C++ for text manipulation, it makes things easier on th... (by Cubbi)
by bruice
read multiple txt files
 
Hello, everybody I got a problem which I want to read multiple text files with C++ and store them. There are a folder includes images files(text files, n...
[no replies]
Array Issues
 
Please see the code below: #include <iostream.h> int main() { int myArray ; int i; for ( i=0; i<10; i++) { ...
[1 reply] : Practically it should show compilation error. Why do you think it s... (by Moschops)
Convert non zero ended string to int
 
Hi guys. I need to parse such string to list (or array) of ints: "10; 20; 345; 45" I though to do this so: std::list<int> lst; const char *cur = str; while...
[2 replies] Last: Thanks. It seems that it's really easy to use streams. (by gamlet2008)
No output While storing the content of file by splitting using strtok function
 
Dear Friends, When I try to print the content of file ( /proc/net/wireless) it is fine but I want only some part of file. so for that I used strt...
[no replies]
Program gives runtime error 6 (SIGABRT) on ideone.com
 
#include <iostream> #include <vector> using namespace std; void check_ap_gp(int a, int b, int c) { if ( (b-a) == (c-b) ) cout<<"AP "<<c + (b - a)...
[2 replies] Last: oh i think i uploaded the wrong code on ideone.com thanks hamsterman:... (by khirodkantnaik)
pointers frustration
 
Hi, I don't want pointers to frustrate me, but I was sure this was correct, which just empties an array for a given array and size passed as parameters. i...
[5 replies] Last: Your initial code int *emptyList(int *list, int arraySize) { for ... (by Pravesh Koirala)
Switch Statement Not Being nice...
 
So, i am trying to make it so that i can make a character move through an area, and it isnt accessing the cases that should be... int mvmnt; int position = 1...
[4 replies] Last: ah, i see it now... thanks. (by kloring4)
create a text box
 
Where would I place or how would i add a text field to this code? //Main.cpp #include <windows.h> #include "HelloWorld.h" EVENTHANDLER EventHandler ; ...
[no replies]
January 2012 Pages: 1... 678910... 36
  Archived months: [dec2011] [feb2012]

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