General C++ Programming - December 2011 (Page 8)

Does this do what I want it to do?
 
I'm trying to make a first person asteroid shooter game and I'm running into some difficulties with the math. I discovered that in order to turn a ship relativ...
[2 replies] Last: Does this do what I want it to do? No idea. Did you try it for a fe... (by shacktar)
C++ application
 
Hello, How can I make my C++ applications look more professional. Thanks.
[9 replies] Last: If you wish to line things up, then setw is your friend. http://www.c... (by thepedestrian)
why the output value have e+007??? please help me.
 
this is my coding #include <iostream> #include <cstring> #include <fstream> #define PI 3.14 using namespace std; void calculate_cone(double,...
[4 replies] Last: You pass C arrays as parameters? If you try to write data in forbidden... (by Catfish)
Which input API is best suited for my needs?
 
Hello. I'm working on a project using Win32 and DirectX, but I'am not sure which input API is best suited for my needs. I want to create a platform game w...
[1 reply] : DirectInput is deprecated. I wouldn't touch DirectX with a pole with ... (by closed account S6k9GNh0)
Segmentation fault
 
// hey can anybody help me with my code of tic tac toe game.. m getting segmentation fault //Two player game of tic tac toe #include<stdio.h> int a ...
[3 replies] Last: Just as a useful tip segfaults most commonly have to do which boundary... (by eypros)
Junction detection.
 
I've been on this problem of junction detection for a few days now. I am making a simple game with a square that moves around and when move it passed a junction...
[3 replies] Last: I would just point you to: http://www.cplusplus.com/forum/beginner/1/ (by eypros)
inheritance
 
Hi guys I am making a "five hand draw" poker game using inheritance. I've previously made a linked list now I need to inherit(maybe spelling mistake :) from p...
[4 replies] Last: Thanks a lot mate! so silly mistake :P (by unstoppy)
Coding Help
 
I am posting the following code snippet unable to understand the error created by the bold underlined line.Please suggest. #include<stdio.h> #include<string.h...
[16 replies] Last: well, i was commenting on what he wrote and i was actually going to do... (by Aramil of Elixia)
valarray, addition of slices
 
Hi, I ran into a strange compilation problem with valarray. Below is a minimal example to reproduce the error. I am using g++ version 4.6.1 (also tried 4.4...
[1 reply] : The non-const version of valarray<T>::operator taking a slice returns... (by aquaz)
by seraph
List/Vector of Template-Class objects
 
Hi folks, I have a problem with a vector containing objects from a template class: template <class T> class TemplClass{ public: T value; virtual v...
[5 replies] Last: seraph, I honestly find that container solutions are rather bad. I'd r... (by closed account S6k9GNh0)
alternatives to system()
 
hello guys i have been hearing everywhere that system() is EVIL.... but no where do they give any alternate methods for example if am doing . system("E:\iver...
[14 replies] Last: Duoas, while that may be so, it's a poor alternative to exec(), Create... (by closed account S6k9GNh0)
double number format
 
Hello everyone, In one of my programs I use a very large number of type double. The number is 12000000. When I run the program and output the number it is ...
[6 replies] Last: it was printing that way cause he didnt use decimals (by Aramil of Elixia)
Dev-C++ Problem!
 
Okay. So here is the part im having trouble with: cout << "Do you trust me?" << endl; cout << "Put 1 for yes" << endl; cout << "Put 2 for no" << en...
[7 replies] Last: also you shouldnt use anything with system () in it (by Aramil of Elixia)
functions and structs
 
So I am making a game and decided to put fighting in it. To do this I made a struct (since it will all be public anyways), with lets say an object named rat. I ...
[16 replies] Last: im sorry that sounds rude. i mean i just tested it (by Aramil of Elixia)
Reading from file and storing to 2D array
 
I want to make a program that reads a map from a txt file and stores it in a two dimensional array of chars. The map is made of " * " and the size of it is 20x2...
[2 replies] Last: I apologize i didn't elaborate enough. I want to have instant access o... (by Vagelis Fragoulakis)
Read-only access to top element of linked list
 
This is a fairly straight-forward problem, and it seems like it should be simple, but I'm not sure how to implement it. I'm probably getting stuck on syntax. If...
[12 replies] Last: The context of the call determines the accessibility. Stack s; cons... (by bbgst)
Request for improvments
 
I have written up a class to facilitate sorting of maps and vectors via a sorting map. I have added questions in the forms of comments. Any help would be apprec...
[2 replies] Last: Thanks for the tips I will incorporate them into future development. (by prw8864)
seekg without loading contents into memory?
 
Hello, I am trying to read in a large text file. I have it such that I know exactly the cursor position I need to get to and start reading. The text file is ~...
[5 replies] Last: hey, I was actually in the middle of asking about using the double lin... (by armstrhu)
reading txt file into a vector
 
Hello, Im tring to write a function which get filename.txt and insert the file values into a 1D or 2D vector. it does work for the 1D vectors, but i get an err...
[9 replies] Last: You can pass the vector by reference (using a &) which won't be slower... (by Galik)
Quiting Excel without Saving
 
I'm trying to make a program that takes info from Excel. So far so good but when it finishes Excel always asks me if I want to save. I use close(); to get out o...
[10 replies] Last: Thanks webJose, that solved my problem completely. My other problem ju... (by librisrouge)
December 2011 Pages: 1... 678910... 39
  Archived months: [nov2011] [jan2012]

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