General C++ Programming - August 2011 (Page 28)

File to file data transfer
 
#include <fstream> #include <iostream> using namespace std; int main() {fstream file,file1; long size,first,end; file.open("C:\\Example.txt",ios::in|io...
[3 replies] Last: long int begin,end,length; begin=file.tellg(); file.seekg(0,ios::e... (by moc72)
Problem with assignment overloading
 
Hi everyone, I'm having a bit of an issue here concerning operator overloading - especially the assignment (=) operator. I'm trying this: template<typ...
[2 replies] Last: Thanks! ZED (by ZED0815)
Not fully understanding Queue???
 
Hello, I have a problem with my understanding with a queue, the problem does not lie in my understanding what a queue is and how to create one but I've tried t...
[8 replies] Last: Yes it looks like you have it. Although it's a little confusing that ... (by Disch)
by LB
What would you do in this situation?
 
I am forced in a situation where I must reinvent the wheel due to limits beyond my control. I have a data structure to hold information, anything I want at all....
[6 replies] Last: Does anyone have any thoughts on what they would do in this situation?... (by LB)
keyboard input
 
hello everyone i am pretty new to C++ and have looked over many topics about this but cant seem to grasp it what i want to know is how can i have it to where...
[5 replies] Last: 1) using my method this is not possible. duoas gave interesting info o... (by TheCreator)
Class doesn't pass data
 
Hi guys. I have written this class, but it doesn't pass the data to the pointer passed as ResultDicom. Does anybody know what the problem is? I would be very gr...
[2 replies] Last: Thanks a lot man. You're right! I was missing that part! (by soheilghafurian)
C++ Template Question
 
Hello, I am trying to create a template that behaves differently if it is give a primative type vs a class. I should be easy enough but my brain seems to b...
[1 reply] : Using boost::type_traits::is_pod... Here is a start. It does not imp... (by jsmith)
by vizard
Is there any way to decode this?
 
Is there any way to decode this encryption #include <stdlib.h> #include <iostream > using namespace std; void encrypt( char p ); // prototypes of functio...
[4 replies] Last: The answer is, no , because you are not actually encrypting your mess... (by Duthomhas)
Getting a keystroke without Pressing Enter
 
I have made a simple Hangman like Game. I wanted to know how to make the console know when an alphabet key is pressed and for it to continue without the user h...
[18 replies] Last: I am also sorry for being so angry... "Intrinsic" is a term to mean t... (by Duthomhas)
SDL problem
 
I'm having some problem on bliting an image on to my buffer in SDL #include <SDL/SDL.h> #include "SDL/SDL_image.h" int x = 100; int y = 100; voi...
[4 replies] Last: There is a possibility to delete a post (why nit entire thread then?).... (by eraggo)
OpenCV Fast Surf combination
 
hello all, i'm new in this site & i hope im not on a wrong forum ;) i'm doing a tracking application using opencv Lib in Microsoft VS 2010 Express & I want to ...
[2 replies] Last: yeah but i did deep researches into the official documentation but i d... (by mohberdy)
Problem with running animation
 
Hello, im making a survival side scroller kind of game, and im having trouble making the running animation. Right now, the direction changes are working( if ...
[5 replies] Last: I know this is going to sound like im not even trying but could you at... (by nano511)
Problem with bool vectors
 
EDIT: The code works when i have only 2 vectors, but once i get 3 i get this error. I'm making my first tile based game and i want to use a bool vector to stor...
[11 replies] Last: Lol i deleted the code the error was complaining about and i get the e... (by Angrymelon)
Overwriting to a Text File
 
I have the following in a text file (for example): 15600 TEXT...200.0 TEXT... where "..." is either whitespace of text and "15600" is a line number. Now s...
[2 replies] Last: I figured that out while I was waiting. Thanks for your help, though. (by pbhuter)
minesweeper help
 
i started to program something like minesweeper, but this doesn't work, can somebody help me please? #include <iostream> using namespace std; int main...
[1 reply] : two things to start with: first of all, surround your code with code ... (by ceruleus)
function pointer - ambiguous symbol error
 
MyClass is a singleton class (There will only ever be one of these in my whole program). What I want to do is follows. 1. Add data to my class using AddData, ...
[6 replies] Last: hey man you can define pointer function to __thiscall function such as... (by ahura24)
by wizo
Unable to start program ....\Final.exe The system cannot find the file specified!
 
Hello, I am very new to C++, I am trying to make use of an existed class, So I have created my main method and trying to call the code existed using the hea...
[1 reply] : If you have linker errrors you probably have to add a library to your ... (by coder777)
rvalue vs. lvalue
 
I have a function that is called many times in my game. It is in the main loop. I am wondering if having a previously initialized int variable is faster tha...
[11 replies] Last: Re: the inializer list It depends on the size of constructor. If the ... (by andywestken)
Bitmap Image is not Valid
 
Hello, First of all, sorry for my english. I will try to make me understand. I'm doing a program with CodeGear C++Builder 2009 that manages a few tables. ...
[no replies]
Allegro error
 
I'm making a bouncy ball program, but get this error: [Linker error] undefined reference to `WinMain@16' ld returned 1 exit status C:\Dev-Cpp\Makefile.w...
[4 replies] Last: Thanks, xander337, it worked :D (by dustegeek)
August 2011 Pages: 1... 26272829
  Archived months: [jul2011] [sep2011]

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