Beginners - November 2012 (Page 67)

Symbols
 
I see these 'symbol' things (dont know what they are actually called...) and I get confused for what they are supposed to do. ++ ! -- I dont know wh...
[2 replies] Last: I was typing this code, and when I used an equal sign it didnt work. ... (by Chervil)
Problem with game and cout
 
Hello. I am trying to write a game where a dot represents players position and X represent a pickup. For now, the object is static and can be changed only in c...
[no replies]
Link List Getting Invalid(garbage value)
 
]Hi there i started working on Link List but i got the invalid value in my programe.. #include<iostream.h> #include<conio.h> struct std { int marks; ...
[9 replies] Last: It will probably be easier to use separate functions to control the ad... (by Chervil)
how can i delete the specific vector?
 
when the bunny reaches the end of his life i want to delete him from the vector ive had no trouble deleting the last one, just the specific one vector <b...
[3 replies] Last: perfect :) that was easy, i have lots to learn (by devonrevenge)
Cin gets ignored?
 
So my cin gets ignored in the void "CReturn()" I don't know to solve this one... Please can someone explain that to me ? Thank u :) void choice(){ char ...
[4 replies] Last: Thanks alot man. I'm finally over that one. Up to the next mistake (by Devilnp123)
char vs string
 
Hi everyone! I am teaching myself C++. I would like to know what are the efficiency differences between using arrays of chars and strings. According to the b...
[2 replies] Last: Many thanks Cubbi! (by DanMachado)
Enumerations, an if statements
 
I was experimenting and unfortunately it didn't work. I tried using enumerations and if statements with else clauses. I only want to use these things because I ...
[6 replies] Last: Ya, I had to make a couple changes to the code but it did what I wante... (by closed account LN7oGNh0)
Simple Question
 
Let's say i'm creating a class and i want to declare one of my "char" private variables to be "const", how can I change its content later on in the constructor?...
[3 replies] Last: Peter87 Thank you, i removed line 8 and it worked perfectly for char :... (by Elie Chahine)
by skarla
pong game.
 
I am making a pong game in sdl. So how i can check if the ball is hited in the center or in the lefft-right side so to the correct direction?
[2 replies] Last: can add me in skype to help me? Because i did not understand.? my sky... (by skarla)
Get information from a line
 
I am writing a small program, that get information from lines of a text file. A line content some fields: name char heigh float alt int sex char (only a ch...
[no replies]
Return class objects
 
Question: When overloading operators, I find myself needing to return an instance of an object, but I've run into some problems: This won't work because the ...
[1 reply] : Actually, upon testing my compiler optimizes this (Even with /Od) so t... (by Stewbond)
assessment program
 
hello guys i made this code for the universty assignment i get 1.2 total gpa but when i did on hard copy i get 1.4 why values are 20,40,50, code #include<st...
[6 replies] Last: can some one tell me why to use #include<stdlib.h> i am confused why ... (by zeeshanas)
First program question
 
int main(array<System::String ^> ^args) { SYSTEMTIME Time; GetLocalTime(&Time); if (Time.wDay > 0) { printf("Hello World"); printf("%d", Time....
[2 replies] Last: system("pause"); Before return 0; (by s123456)
Functions
 
How could I begin to put this program in functions like I need to have one main function, a function for the mean, one for the max/min and one for my standard d...
[1 reply] : just add functions like add, subtract, etc. e.g. : double add (doubl... (by chipp)
by Meden
Broken code: srand and cin.get
 
Hi. I am just starting out learning C++ as a hobby. I am writing programs from exercises out of a book. The "Math Tutor" exercise I am working on right now a...
[4 replies] Last: Awesome. :) Thanks. It's perfect now. :) (by Meden)
Class for a deck of cards
 
I want to write a class for a deck of cards, but I'm not really sure what the best way to go about it would be. Any suggestions?
[1 reply] : The way I looked at this was starting with each card first. class C... (by ryancb06)
Check input data via bool function
 
I'm having a hard time coming up with a way to check to see if values gathered from cin days (1-31) and months (1-12) can be checked via a bool function. Her...
[1 reply] : I think (! (1<= M && M<=12)) you would make it complicated I am not s... (by gladi)
Where does the IDE place .txt files
 
http://www.cplusplus.com/doc/tutorial/files/ I just finished executing this but I didn't get any file on my desktop. So where does the .txt file get plac...
[2 replies] Last: I meant to say in Xcode (by joshsmith01)
Multiplication/Division problem with big numbers
 
Hey folks, Recently I wrote a program to the athematic operations with large numbers traditionally known as bigint.
[4 replies] Last: Well I heard shifting will solve the problem with very big second oper... (by johncplusplus)
by Sh0
Populating a vector of strings.
 
SO I'm working with this right now: #include <iostream> #include <filesystem> using namespace std; using namespace std::tr2::sys; void scan( path ...
[2 replies] Last: Thanks, that was extremely helpful! (by Sh0)
November 2012 Pages: 1... 6566676869... 75
  Archived months: [oct2012] [dec2012]

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