General C++ Programming - June 2012 (Page 23)

copy of cout object
 
I was playing around with cout, and I found the following situation: #include <iostream> using namespace std; void foo1( ostream &os) { os << ...
[2 replies] Last: thanks Zhuge (by santiagorf)
"Error: Incomplete type is not allowed"
 
I'm getting this error: Error: Incomplete type is not allowed on the following line: double horizon_value::test(brain<horizon_value>& B) { neur...
[2 replies] Last: Ah right I got it; the problem was that while I did forward-declare b... (by ausairman)
Template Specialization (with) inheritance
 
Hi, I have to following problem: I have a template class named something like "BaseClass<type>". Some of the members require different stdlib functions de...
[2 replies] Last: When you create a template specialization (lines 1-8, second code piec... (by firedraco)
*char to int conversion I'm about to kill a child.
 
Hey there!, I am trying to have a changing value in a member variable that is set to private.. Here is exactly what I mean. SDL_Surface *TTF_RenderText_Shade...
[8 replies] Last: Ur welcome. I'm glad to be of help :) I think Coder777 is only trying... (by soranz)
Problems with Scanf()
 
I am trying to import 3 columns of data that are all in one text file. I thought scanf would do the trick but i dont think i understand it well enough for(in...
[3 replies] Last: You should read description of fscanf before using it. (by vlad from moscow)
'this' may not be used in this context
 
Hello, I am currently working with my member function definition, which is as following: void IntArray::Insert(int valueToInsert, int indexToInsert = t...
[12 replies] Last: I set the m_arrayPointer to the new array, the one with the inserte... (by Flurite)
Hate OpenGL moving to DirectX Problems!
 
I've Been using OpenGL for a while I was able to render a 3d model / parse a wavefront .obj file but I really hated the problems I ran into that were seriously ...
[6 replies] Last: nevermind I moved back to OpenGL I don't like how DirectX does its mod... (by Noobscratcher)
Query in implicit assignment operator
 
Hi, I am trying following program #include<iostream> using namespace std; class name { public: int* age; name (int value) { cout<<"calling constructor\t...
[6 replies] Last: Thanks guys :). I deliberately did not define overloaded assignment op... (by incognito)
Getting a Floating point exception ?!?!?!
 
Here's my code :- #include<cstdio> int main() { int n,i,ul,a,x,y,z,s=0; //n is number of tiles, i is counter variable , ul is upper limit & a,x,y,z are tem...
[4 replies] Last: Yes , i obviously did compile it . Some Input values for which it g... (by Maggi Iggam)
by Jikax
union larger than largest struct
 
My union is larger than the largest struct, why is that? #include <stdio.h> typedef struct { UInt32 a; UInt32 b; UInt32 c; }GndOrigin; typede...
[1 reply] : The size of the union has to account for both size and alignment requi... (by mpauna)
by Gadir
Array filling problem
 
Hello everybody, i wrote a program which find every pixel and check their around. I want to write every checked pixel to 2d array. For this reason i initiali...
[8 replies] Last: I think it's too much to be a one-byte-behind-another memory type. And... (by S G H)
Object Array in a Game
 
I'm trying to program a basic game. I have a ship that I cant move but I can't get it to shoot. I'm using an array of bullet objects which a for loop goes throu...
[1 reply] : Time to learn to debug. I suggest you start by adding logs. Dump to s... (by Moschops)
by Jggrnt
Algorithm help: Which algorithm to use?
 
I am coding a program which finds the cheapest way to carry a product. We have a building which is N * N * N sized. We have a start room and finish room...
[2 replies] Last: Hi, Google Dijkstra's algorithm that may help. Good luck (by Anomen)
Bloxorz game . how to move the rectangular block?
 
I am developing the bloxorz game : see this link : http://www.albinoblacksheep.com/games/bloxorz hello , . I have some how managed to draw th...
[no replies]
by tarkes
Visual C++ ONDRAW()- Flickering/Refreshing images drawn by CDC::setpixel()
 
for(int y=0; y<=600; y++) { for(int x=0; x<=600; x++) pDC->SetPixel(x,y,RGB(0,255,0)); } These codes I have writeeen in a SDI application in the ONDR...
[1 reply] : Yes, a message gets sent each time you call one of the max min etc fun... (by soranz)
Reading Database structure
 
i want to write a code that will help me read database structure(.accdb in particular), meaning it will give me number of table that are there, there structure ...
[no replies]
How to restart service
 
Hey guys I am making a service in VS2010 using c++ and want to know is there any way to restart the service after a particular time,actually i will let user to...
[1 reply] : Hi, write another service which controls the main service. This contro... (by shadow123)
Dumb Question- How to open a .exe file from a form
 
How do you make a form open a .exe file that is somewhere else in the computer? I know this is a dumb question, but this is my first year programing and I'...
[2 replies] Last: And for the division I think you have to convert your values to a real... (by soranz)
by macs
Error when an exe file is opened..(created with turbo c++)
 
The error has occured.... I wrote a c++ programme and saved it as an exe file..so that the code is executed directly when it is opened... but the following err...
[1 reply] : There should be a return value at the very end like: ... getch(); r... (by soranz)
String replacing
 
I am having trouble with string parsing and replacing. Here is my code. #include <iostream> #include <fstream> #include <string> using namespace std; int ...
[1 reply] : Hi, there is a nice library for parsing GPS data here : http://ardui... (by Anomen)
June 2012 Pages: 1... 2122232425... 33
  Archived months: [may2012] [jul2012]

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