General C++ Programming - July 2011

Simple 2D graphics engine
 
Hello all, I'm fairly new to C++ but have experience in other languages like JavaScript, BlitzBasic, and HTML. I have an idea for an operating system I want t...
[4 replies] Last: 2D graphic game engine !! i think the clanlib the best of them (by ahura24)
Is OpenGL usefull for 2D graphics?
 
I understand its known for its 3D power, so I dont know how it fairs in the 2D realm. From what I see, its better than GTK+ and all these other 2D graphics.
[2 replies] Last: i think for 2D game the best game engine is ClanLib . go to www.clanli... (by ahura24)
Problem connecting MS Access
 
Hi I'm trying to connect to MS Access, I have this source: #include <windows.h> #include <sqlext.h> #include <stdio.h> #include <stdlib.h> int main(...
[14 replies] Last: I just compiled the example in this link: http://archive.msdn.micros... (by naderST)
by fsshl
ISO C++ forbids delcaration of 'parameter' with no type
 
Dear c++ expert: I am using gnu/g++ 4.5.2 to compile a piece of code(page 423 of book(C++ cookbook))(that book claim these programs in examples can compi...
[3 replies] Last: but the run result is not what book predict -------------------------... (by fsshl)
Overwrite
 
Is there an "overwrite" method or function in C++? For example, I have some data in a text file that I want to overwrite with other data. The data is lined up n...
[8 replies] Last: Alright, well that poses another problem, partially something I alread... (by pbhuter)
Returning a Struct from a Class
 
Hello, I need to return a Struct from a Class. The struct must contain two different string values, and a vector<string>. Here is the code I've written so far: ...
[6 replies] Last: that's what I was trying to do...so, you can place the struct within t... (by paulmcco)
How can i teach my image binary values?
 
#include <fstream> #include <iostream> #include <bitset> using namespace std; int main() {ifstream file1; ofstream file2; file1.open("F:\\exam.jpg",...
[11 replies] Last: Thank u for ur helps. (by Helegurbann)
taking strings from a vector
 
I need to take the top level string foreach iteration of a vector and output it to a program separately...I can get first word with myvector.front()...how do I ...
[4 replies] Last: If you need to push_front/pop_front as well as push_back/pop_back you ... (by andywestken)
c++ callback question (function pointer)
 
Hi, I need a little help here. I am working on a video project and I have a dll that receives video data coming in from the network. I want to do the fol...
[5 replies] Last: I think it's good form to typedef your function pointer. It is also... (by andywestken)
When to use reinterpret_cast
 
Well... My issue comes up from having to load big-endian floats from a file. I can load an unsigned integer easily using this function: unsigned int getIntFro...
[3 replies] Last: I think your use of reinterpret_cast is ok -- if blunt -- in ths case.... (by andywestken)
fstream printing new line
 
This program is designed to calculate your bodyfat percentage using a method used by the navy. I want to enter the info, have it print the results to a file. Wh...
[7 replies] Last: That works too. I will paste the updated code incase someone in the f... (by asmcriminal)
by mgm11
acess violatione error
 
i keep getting an acess violation. it has to do with my parameters, or initialising of parametrers. can anyone get my code to work? #include <iostream> #in...
[3 replies] Last: you are right it is the seting of the parameters was where i found the... (by mgm11)
GPA Calculation Program/User defined Functions
 
I was given an assignment with the following parameters, basically five user defined functions. The output file should display the average male and female gpa b...
[1 reply] : Where is the loop to read the file? I see things that look like I am ... (by Azagaros)
A few questions
 
1) What does it mean when you declare a class as the following : class Name : public Something 2) I've seen before an instance of a class being set ...
[3 replies] Last: Ah thanks to the both of you, I get it now :) great help thanks guys :... (by wonopon)
by dams
Pointer assignment.
 
How to I assign an address to a pointer. I want to do something like this: long int *p; p = 0x100100080; 0x100100080 - I know this address is in memory and ...
[12 replies] Last: Maybe the 2 memory chips he's got use 32-bit addresses so the most-sig... (by Tanatos)
General polymorphism issue
 
Hello everyone, I recently got interested (again) in the concept of abstract classes and interfaces. I'm currently designing a simple game using SDL and I decid...
[4 replies] Last: Yes, I realised I don't need isRenderable(), etc. with dynamic_cast. I... (by Tanatos)
[Help] How to Initialize an Array in a Constructor
 
I am trying to initialize an array in my constructor and storing it in my char board . I am not sure how I can do this. I just want to initialize the value for ...
[7 replies] Last: I tried gcc 4.4 and it didn't like the array initialization. But I ... (by andywestken)
Aggravating Segfault
 
I've been staring at this code for about an hour, and I can't find the bug. It should be something simple, but I don't see it. This is not my first time working...
[11 replies] Last: Thank you ^_^ (by Hethrir)
problem when compiling a program
 
Hi, guys! I'm new to C++ programming and I'm currently using Linux. I wrote this program(that checks if a number is prime or not): #include <iostream> usin...
[2 replies] Last: Thank you very much! I figured it out and now my program works . (by PlusPower)
How to compare and check in c++ using loops and array
 
Nevermind no response solved.
[1 reply] : Never delete your question. Other users may have referred to your ques... (by closed account zb0S216C)
July 2011 Pages: 123... 30
  Archived months: [jun2011] [aug2011]

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