Beginners - August 2012 (Page 15)

vector trouble
 
Hey all, I'm pretty new to C++ so any help would be greatly appreciated! I'm trying to use vectors for a small program in place of arrays (though arrays are ...
[8 replies] Last: In your example public: Board() { board = vector<char> (3); }... (by vlad from moscow)
regular expressions
 
So I just started playing around with regular expressions, and I quickly ran into some trouble. Here's my code: #include <tr1/regex> #include <iostream> ...
[2 replies] Last: i included hesder<regex> in the header and i got the same errors along... (by mihail911)
by skarla
gray hat.
 
I wanna become a gray So i ask you if 1)i need certificate from university,2)if i can make some money,3)if need intelligence and creativity,4)(i know c++),so it...
[13 replies] Last: I am sorry about the above replies. I made the fatal mistake of not s... (by kaseron)
Array Self Continuing
 
I just made this code... but I want the "tablas" array to continue to write on itself without me having to write 100 times cout<<tablas <<endl; is there a wa...
[2 replies] Last: thanks Texan40 Never cross my mind... Guess I have to rest a little bi... (by Mario Robles)
Selective coloured text
 
For a console app; I know you can use System("color XX"), but that changes all the text and I only want just a word or several lines of text to be coloured.
[3 replies] Last: I tried Volatile's method, and that works thanks. (by tyriuth)
stuck with file i/o with C
 
Hi, I'm having trouble with C, especially with string i/o and manip. I've gotten used to C++ with its string class and vectors, but having to learn C is a re...
[6 replies] Last: **** EDIT: Apparently changing 100 in this line of code 100, ... (by hitholdir)
Classes as Class attributes
 
I'm a java programmer and am trying to build a small app that builds and prints trees. I have classes that contain instances of other classes as attributes...f...
[7 replies] Last: Thanks for all the insight...i get the pointer issue now...you must ex... (by troutguy)
by CeTis
Issue with pointer delete
 
Hello All, I'm creating some projectiles and have an issue removing them. The projectiles are created locally with a pointer and are stored into a vector. Whe...
[5 replies] Last: So I seem to have somewhat solved this by doing: void CObjectManager... (by CeTis)
reading with cin strings into a char sequence
 
Before everything, hello everyone! i have been visiting this site since i am starting to learn c++. Everytime i dont know how to do something, your site has the...
[3 replies] Last: Do I see the use of system() in this program??????? How DARE you us... (by kaseron)
static variables in classes
 
I am trying to make a class called "Arguments" which will handle all the arguments for my program. There is a void function inside the class that will: -tak...
[3 replies] Last: Your understanding of static variables is correct. You need to initia... (by mik2718)
by Algren
Need Direct2D Help
 
I am new to C++ programming. Im also new in graphic designing, etc. I have tried to incorporate Direct 2D graphics into my program, but it goes a bit out of ...
[1 reply] : I would suggest you use Direct3D instead, just limit what you draw to ... (by kaseron)
How to bind key
 
Title tells all.
[4 replies] Last: Yes it's console application (by Blaz Rezar)
Read from cin if there is something within some time, otherwise skip
 
Hello! I need a program to make that if something (for example, a char) is entered from cin within a certain amount of time, it reads it, but if nothing is e...
[2 replies] Last: +1 Stewbond, I just want to add that SFML has a pretty easy to use cro... (by Computergeek01)
Object oriented help
 
I have this program I'm working on for a small assignment The instructions will be posted. If you could give me any help it would be highly appreciated. I'm jus...
[10 replies] Last: The issue is there is errors because I'm having trouble finishing the ... (by atown282)
Writing to a text file
 
I have made a program which simulates a pendulum, I need the values to output to a document but I'm getting a couple of errors. Here is the code #include <s...
[9 replies] Last: It's not just neater, it's necessary. Imagine the first iteration of ... (by MrHutch)
amount of possibilities. dice lots of nesting
 
hello i have a function that should get the amount of ways you can throw a specific number (sum off all dice) with 9 four sided dice and 6 six sided dice. the p...
[2 replies] Last: example: if i want to know in how many ways i can throw an 8 in total ... (by gelatine)
Organizing Vector
 
Hello, I was wondering how I could possibly organize one vector by placing it into an another. (Note: They are vector of objects). What i have so far is: ...
[3 replies] Last: You mean that you want guy unsorted and newGuy sorted? Like so: c... (by coder777)
Reading objects till eof
 
Hi, I try to read all the objects contained in a file with the following code: vector<Cube>cubes(); ... ifstream in(file, ios::binary); if(in) { for(int i...
[2 replies] Last: Dooh! :genius: Thanks and sorry for the ignorance! (by AirCoder)
3 of a kind
 
Hi guys, I'm creating a little game just as a side project to help me further my learning with c++ and I am stuck on what i feel like is a simple logic probl...
[3 replies] Last: It will be even shorter to write the function the following way bool... (by vlad from moscow)
by tone
for loop guard..
 
Is someone able to explain the difference between these two segements of code? I'm really confused and struggling to get my head around it.. My understanding i...
[1 reply] : 1)Let n=10 then first loop will progress to c=9 only but second loop w... (by Akshit)
August 2012 Pages: 1... 1314151617... 45
  Archived months: [jul2012] [sep2012]

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