General C++ Programming - April 2012 (Page 3)

Event Loop Vs Message Loop
 
Hi, sometimes these two concept make me confused, Are Event and message the same meaning ? If not ,what is the the difference? In OOP these two words are fr...
[10 replies] Last: Verry well explained.. Always good to learn new stuff, thanks good we ... (by codekiddy)
How to make a program with an array that returns the biigest element in a function?
 
Can someone make a simple program with an array that will return the biggest element in a function?
[7 replies] Last: It does, it just requires a fairly recent compiler with enabled C++11 ... (by hanst99)
Subclasses derived from same class, all in one list?
 
Hello all, I have a simple class hierarchy, with a few different subclasses inheriting from one superclass. Objects of these subclasses are all put in a list ...
[6 replies] Last: The error message tells you that item::printDetails() is not defined. (by Athar)
by tw3tye
Problem including file
 
Hello. Not shure how to describe problem. Here is my program 'dont worry about cleaning code i just got problem using SDL_Surface* SurfScreen"from Main.h" in Lo...
[2 replies] Last: Thx for help... i had error doing that before. i gues i had tipo error (by tw3tye)
by siloan
'Dinamic' array
 
Hi there, is there posibble in c++ an array or a struct like this php array? $array = array("foo" => "1"); I want to create something like this - something[...
[3 replies] Last: Dynamic*. Read the Dynamic Memory part of the tutorial on this site. ... (by closed account zvRX92yv)
Nested Structs or Vector of Structs?
 
I have a structure with a vector of strings inside. I basically want a way to assign the different strings in the vectors different properties. I'm currently ...
[3 replies] Last: Thank you! This is exactly what I was looking how to do! (by gamerw00t)
by tw3tye
Simple int* to int
 
Hello. i have function using int*. Im trying to get int* from SDL_Rect will this work? "im wondering will this return int*" int* Hero::PosReturnY() { ...
[3 replies] Last: Well, what you did earlier would work , it just wouldn't have done wh... (by hanst99)
file create
 
Hi, i have created a game in c++ and i want some way of saving a highscore to a file and loading it when the game starts all i want to do is, when the game fir...
[1 reply] : What's the question? (by hanst99)
by Ali89
Longitude/ latitude to cartesian coordinates
 
Hello, I have a file consist of some latitude/ longitudes and am looking forward to converting those geographical coordinates to cartesian coordinates. Has a...
[4 replies] Last: This is accepted with the approximation that the earth is really a sph... (by TheDestroyer)
toupper for unicode
 
Hello Im working on a project that includes read/write operations from an sd card formated with fat.If i want to use long file names the only thing i have to...
[2 replies] Last: i didnt try it but i think it will work. But what about the convert fu... (by giannhssdra)
QT Programming - qt Creator problem
 
I just trying the basics of qt progreamming and I have some problems. 1. When I build project in debug mode it is ok and i can run app in qt creator and outsid...
[4 replies] Last: thanks it works finally (by Anon777)
fastest way to resize dynamic arrray
 
Dear all, I am a visual basic user, but I need to learn C++ to use the library of my colleague and reduce the calculation time. When I use visual basic I often ...
[2 replies] Last: use a c++ matrix library with a good documentation, so you save time a... (by therockon7throw)
data array
 
#include<iostream.h> #include<conio.h> #include<math.h> main() { int i; int A ; for(i=0;i<1001;) { A =i; co...
[4 replies] Last: Maybe you can tell whatever it is cout is outputting to to not discard... (by Peter87)
Read text file into binary search tree
 
I need to read a file and insert each word into a binary search tree. I'm halfway there but I'm a little stumped. It opens the file just fine but then how to g...
[2 replies] Last: That works great, thanks. However, as it iterates through several docu... (by giszzmo)
file handling
 
write a c++ code in which i want to write the output if programe in a file and i have to find that data that i am writing is already present in that file or not...
[1 reply] : k (by Zhuge)
by shaggy
SDL app freezes when call my a member function
 
Hello I have an SDL app that works fine, it has a main game loop and i noticed that if i add another while loop in main, the window freezes. This is my code for...
[6 replies] Last: Yeah i guess that would be better, i will jsut get the library that al... (by shaggy)
Pointer
 
When i use the following: *p = val; p++; I do not get the correct value but when i do *p = val; //next iteration *(p+1) = val1; i can access all el...
[1 reply] : I have no idea what it is you're asking, but *p = val; p++; Will a... (by hanst99)
Key press capture hiccup
 
This may have already been asked and it is probably OS oriented, but I am trying to make linear movement of an object with key presses. The only problem is that...
[no replies]
by Mannah
2D array class !!!!!!!!!!
 
this is my header file #ifndef matrix_h #define matrix_h class Matrix { public: Matrix(int c, int r);//default constructor ~Matrix();//destructor ...
[4 replies] Last: when i run the program it gives an error Since you can't compile t... (by cire)
sort
 
I need to sort a string, for example string s="A0,A2,A1,A3" where s is a input string, and the required output is "A0,A1,A2,A3". How do i do it? i tried using s...
[3 replies] Last: Thanks every one. (by syed123)
April 2012 Pages: 12345... 49
  Archived months: [mar2012] [may2012]

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