Beginners - February 2009 (Page 18)

What is wrong with this birth year finding application?
 
Hey, I'm going through but I can't figure out why this doesn't work/ #include <iostream> #include <conio.h> using namespace std; string month; unsigne...
[2 replies] Last: Thanks a lot. Didn't know that :D All working now (by Dysxqer)
by Locane
Variable name extrapolation
 
Hi. Is there an easy way to extrapolate a variable's name and print it? For example, if I have a variable named count, is there a built-in procedure that ...
[4 replies] Last: FWIW the preprocessor has a stringize token. Off the top of my head I... (by jsmith)
Class member function does not accept another class as an argument
 
Hi everyone. I am trying to make a very basic game as an exercise in classes, and I have got stuck. To recreate my problem I have written 2 classes, one for a...
[7 replies] Last: Thanks I'll see if I can make that work. (by tomob57)
by turke
Radnom Number Generator
 
Which Random Number Generator would be best? By best I mean simplest and non-repeating!
[8 replies] Last: The % operator returns the value 'thats left', eg 8%3=2 (because 3*n+2... (by Scipio)
Another "Press Enter to continue"
 
I know this has been asked a lot of times, but none of the answers seems to work. The int main(): int main() { cout << "Hello Everyone" << endl; cou...
[8 replies] Last: Or, you can stop being a lazy slob and just open a goddamn console . ... (by helios)
by abm
undefined reference
 
I am getting undefined reference in this code //>>>>Main.cpp #include <iostream> #include "Stack.h" int main() { std::cout << "Stack Program with array...
[5 replies] Last: Right Thanks. (by abm)
Bad ptr when reading from text file
 
Hello, I am trying to read integers from a text file as an exercise. I have included the code from my program. Watching the values of variables in the prog...
[2 replies] Last: fscanf like scanf needs the ADDRESS of the variable. e.g. int ... (by guestgulkan)
loading a file into a vector?
 
I need help loading a file line by line into a string vector. My program keeps crashing as soon as it opens and i am not sure if i am doing it correctly. Please...
[4 replies] Last: alright, that worked. Thank you very much. (by KBakerSR)
by Inks04
Im not understanding the loop
 
Hello everyone! I'm a student and I'm beginning my class in c++. My assignment is asking for a loop. I don't understand how to start the loop or to get where I ...
[1 reply] : Start here: http://www.cplusplus.com/doc/tutorial/control.html (by airowe)
opposite bool compare output, why?
 
tihs is an extension of the dice game i am making, but i have two string arrays that look like #include <string> #include <vector> #include <iostream...
[3 replies] Last: What's wrong with NOT? std::string has operator== overloaded, so you ... (by helios)
i have problem with array.
 
hi. im new to programming world. im trying to practice and decided to make a little program to find out the "balance" between x amount of numbers.(the user wil...
[1 reply] : Not like that. float *items=new float ; Don't forget to free it af... (by helios)
How to read text from console?
 
Hi, I would like to know can I read text from the console? Text is drawn in the console window so it's in RAM and I assume that it should be possible to acces...
[4 replies] Last: If you are on Windows, you can also use the ReadConsoleOutput () func... (by Duthomhas)
Counter in Array / Comparison?
 
I am working on a ''dice'' game. The data for my program looks like three columns, one per each roll. Assume 5 different players will each get 2 rolls, so the...
[1 reply] : This code was mostly made by my friend but maby you can get some ideas... (by SioS)
by airowe
Procedure to swap values
 
I need to write a procedure that swaps the values of a and b if a is greater and otherwise leaves a and b unchanged. Here is what I have so far: #include<...
[19 replies] Last: Fascinating. I've no fear: g++ -O6 foo.cpp -S on the following ... (by jsmith)
can get int but not string
 
hello everybody, in my program i have a class witch take two parameter before for intialization for stuff(string name, int id) and when thrying to print the ...
[5 replies] Last: Yes. The strings dad, mam, onkle, tante are all default constructed t... (by jsmith)
by masiht
program runs for a second
 
Hello When I run my program the output comes just for a second.Can I use cin.get(); to stop the output ? If yes where. I will be thankfull if someone tells ...
[5 replies] Last: cin.get() reads a character from cin http://www.cplusplus.com/refer... (by Bazzy)
by mrm
Incrementing sign and lines
 
Hi, english is not my mother tongue so bear with me please. I have an assignment where we're going to write a program with the following effect: Enter lin...
[5 replies] Last: You could also start with a string initialized to "*", perform the out... (by seymore15074)
by borok
c++
 
Hi the program is mostly done, i am trying to compile it and thats when i have problems. I am using Xcode(mac). I just want to know if the code is good, bcoz ev...
[5 replies] Last: In XCode, pressing Apple+Y will run your application in debug mode. If... (by Lodger)
by turke
#include ?
 
Which are the most used include files and what do they do??? Tnx and best regards!
[2 replies] Last: ty =) (by turke)
How Can I Make an .exe File Out an .exe? - C/C++
 
I have a program creator.exe that looks as: Please create the application on the fly: 1. calculator Choice: 1 Once user enters a choice the output wil...
[2 replies] Last: no helios! this is just an idea, i'm aiming for more interesting progr... (by f ben isaac)
February 2009 Pages: 1... 1617181920... 22
  Archived months: [jan2009] [mar2009]

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