General C++ Programming - January 2012 (Page 25)

Using deque<double> as array
 
Hi, I am having trouble with the following code size_t l = 100; std::deque<double> numbers(l, 0.0); for(size_t j=0;j<l;j++) { numbers = j; } lo...
[3 replies] Last: Thanx for your answers! After checking the deque reference again, ... (by freaklamarsch)
Card game template (1,2)
 
i have a project to create a deck of cards in a class (store them in an array) so i can use them later to create different card games, the class, i have been to...
[22 replies] Last: ok i have completed it, and it works fine, thank you all very much for... (by Xendraw)
Proofread my Code!
 
Ignore the fact that my functions are rather incomplete. I really have a question about whether or not i can declare variables in the function when i declare it...
[3 replies] Last: You can declare a variable wherever you want. Passing 'choice' to menu... (by coder777)
by soranz
multiple stringstream objects
 
Hi ! I'm just learning how to use stringstreams. They seem to be powerful but they are confusing too. I want to be able to keep using the same stringstream obj...
[2 replies] Last: Thanks Borges ! Worked like a charm :) (by soranz)
Winsock Error 10045
 
Hi, i thank anyone in advanced with even a hint of what possibly is wrong but i just started using VC++ 2010 and migrated my projects over from VC++ 2008 and no...
[5 replies] Last: ok kbw i thank you very much on this, i will give using select() a sho... (by gunner916)
Excel generation in C, C++
 
Can anybody help me in finding information or sample code to generate Excel file using BIFF8 format in C or C++ (not Visual C++).
[3 replies] Last: BIFF records make up .xls files. But the format's been tweaked for ea... (by kbw)
how to overload < for std::sort
 
Hi Everyone Say I have a class public A{ A(std::string name); std::string name; bool operator < (const A *(&right)); } int main() { A *a = ...
[3 replies] Last: Thanks Cubbi those were really good responds and functor is what I nee... (by vietory)
char and const char help
 
Hi, I am building simple program that takes three inputs as sides of a triangle to determine the triangle type (equilateral, isosceles, scalene). When I compil...
[4 replies] Last: I'm using atoi bc I know that it returns 0 if a string contains someth... (by closed account 4ET0pfjN)
by bd123
C++ Vectors and Optimization
 
This is my first time working with vectors in C++ and is the first time I have had to create any sort of path finding algorithm. Using the logic on this page h...
[2 replies] Last: I am using the algorithm that was on the wikipedia page because it see... (by bd123)
If statement checking chars
 
Hey all, Im having a little trouble with this program. I'm trying to get my if statements to check 2 different char inputs, but for some reason It just displays...
[8 replies] Last: It was a truth table assignment for discrete mathematics. The main ass... (by oiramih)
Need help with c++
 
I've been learning c++ using code blocks and I decided to try using visual c++ so I could eventually use directx sdk so in code block the hello world code I u...
[15 replies] Last: But why in visual c++ does it pop up and instantly go away Use Ctrl... (by Cubbi)
Battleship problems!
 
i am creating a very simple and "robust" version of battleship for my c++ class. the game is just pretty much the computer placing a board of his own and you tr...
[8 replies] Last: yes thank you i was having trouble and that was why, but still, it on ... (by ramus313)
Little help with c++ and directx please
 
Ive been learning basic c++ from thenewboston.com and I used code blocks and everything worked fine(like the simple hello world). But I wanted to start learning...
[1 reply] : Visual C++ uses Microsoft's compiler, whereas Code::Blocks uses MinGW'... (by closed account zb0S216C)
by Colan
Hi, SDL query..
 
Hi, I'm new to c++ and have made it far enough to start building a game in SDL (beginning to anyway) I have read a lot of tutorials and can't figure this one o...
[1 reply] : You're using SDL_Flip wrong. I don't know what you expect it to do th... (by Disch)
Error in a program.
 
hello everyone... i try to do a program for my shool and i have to make it and e-mail it NOW! :( but i cant fint what wrong i make! can someone help me PLZ! i ...
[10 replies] Last: yes! tnx m8! i will try fix it now! tnx! (by stamatis)
by xNovak
Simple Terminal Game
 
Firstly, as I'm new to C++ and this forum, I'd like to say a quick hello to everyone. *Side note: I'm not sure if this belongs here, but I can't see where else...
[4 replies] Last: That's because of this: if(player2Attack == 'y') //////if 'y' ... (by Lynx876)
Parsing strategy
 
I'm designing a configuration file that users can use to customize my program's behavior on initialization. Commands have the $ prefix so I can process c...
[5 replies] Last: [quote=Stewbond]Now is there a shortcut for lines 6 and 16? A standard... (by ModShop)
Strange Heap Corruption
 
Or at least I think the problem involves some kind of memory error. I'm making a program in SFML and I'm currently working on the menus using a GUI class that I...
[8 replies] Last: That's what I thought too, it was probably something of my own doing, ... (by ModShop)
operator overloading
 
i dont have idea how to use the overloaded '+' operator to concatenate two strings i wish to recieve a response from anyone who knows it and can explain it in ...
[5 replies] Last: There is a default + operator for std::string + const char * (in std::... (by LB)
Going crazy with adding char* values to a vector
 
O.K. Take it easy, don't break anything. Just breath slowly! So, I have this problem since I started this project and now I think I know what happens (but not h...
[12 replies] Last: Peter07, I would to give you the biggest hug ever. Thanks man! Thank y... (by alexbnc)
January 2012 Pages: 1... 2324252627... 36
  Archived months: [dec2011] [feb2012]

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