Beginners - October 2012 (Page 36)

No Output
 
Finally got my program to run without errors but it will not print anything. #include <iostream> #include <string> #include <fstream> using namespace s...
[8 replies] Last: It did! I finally got everything straightened out. Thanks!!! (by anreese1)
how could i create random objects? and assign values to them?
 
i am attempting a lighter version of the bunny challenge, first i just want lots of objects popping up with certain variables that may call functions or get cal...
[14 replies] Last: thanks guys...this reference thing is difficult to master...i have hit... (by devonrevenge)
Read file with special parameters
 
I need to read a file that has: Bob boy george boy Jessica girl patty girl ... I have to read each line and say Bob is a boy. So I read the first wor...
[no replies]
Trouble with getting program to function properly
 
So this program will compile, but I cannot get it to print out anything so i do not know if it's doing what i intend. I'm trying to get it to convert text from ...
[1 reply] : Use single quotes for characters ' not ". Also #include <fstream>. T... (by scapegote)
a question about class
 
hi, I wrote this code,but It doesn't work when I complied it.please tell me that what is it's proplem and solve it. #include <iostream> using namespace std;...
[3 replies] Last: In the constructor account::account(int i) { if (i<0) { balance=0; co... (by vlad from moscow)
a program to bleep out words
 
I'm trying to write a program that "bleeps" out the word "hello", but not other words; that is read in words using cin and print them again using cout. However,...
[1 reply] : Try the following while (cin>>entry) { if ( entry == bleep ) entry ... (by vlad from moscow)
variable meaning
 
Hi, I am looking through some advanced code and I have the need to understand some code variables. First, what does this mean: President&, Secondly, what...
[3 replies] Last: The first looks like a syntax for a reference to a President. The sec... (by Zhuge)
by Aceix
Enumerations--enum
 
Hi all, 1-I just want to know whether members of an enum can be assigned only int values. 2-Can I make a function's parameter type be an it instead of an en...
[1 reply] : 1. Members of an enumeration can be assigned constant integral express... (by vlad from moscow)
Don't know whats keeping this from working
 
Hello, I am trying to write a basic program that asks a person their name and their height in inches, then displays their height in cm. When I run this program,...
[2 replies] Last: char name=name; Don't you get compile errors(or even warnings) for t... (by Aceix)
Title screen
 
Hi im new to C++ but im a realy good coder in java but i dont understand C++ i got some books on it but its dont explain what i need im making an FPS game with ...
[3 replies] Last: There is no alternate that will make it noticeably easier. The standar... (by Moschops)
Function main() confusion
 
Hello, There's still a thing that confuse me in C++. Specially in that main() function. This is my question. Does the real world programs written in C++(milli...
[8 replies] Last: I use Microsoft Visual Studio C++ 2010 Express. The MS C++ compiler... (by Moschops)
Hw Help
 
Hi all, new to C++. Currently I need to modify a script. The things I have to change are: -Limit the date so it does not exceed 12(months), 31(days) and the ...
[3 replies] Last: Just start with what you know how to do and research what you dont kno... (by closed account 3qX21hU5)
little problem of pointer
 
do arr[a+4] and arr +4 have same meaning ?? also *(p+3) and*p+3 ??
[4 replies] Last: Try running this code, see what is the output: int arr ; arr... (by Chervil)
Value returning functions
 
I need to modify the program so it uses a value returning function to determine commission. I am not sure what to do. Any help would be nice. I have started to ...
[6 replies] Last: I have not tested this or looked at it in detail but this is the gist ... (by mike12255)
Errors in file handling code
 
Hello everyone, I am taking my first class in C++ and I have run into some errors while trying to write a file handling and application program. I thought ...
[13 replies] Last: Thanks for all your help. I had a feeling I had other issues. I'm tr... (by geowalsh3)
Making Variables work in Multiple functions
 
How can I make Variables work in multiple functions? Example: #include <iostream> using namespace std; class PlayerMove{ public: ...
[no replies]
do x*x by repeated addition
 
I am attempting to implement square() without using the multiplication operator; that is, do x*x by repeated addition. For some reason, however, the number is o...
[6 replies] Last: if you want to square a number use the #include <cmath> and use the ... (by mordreds)
Need help with my program. Compute salary using functions.
 
Hello everybody I am a noob and need help with my program. The function names and variables are given in my assignment and cannot be changed. I get zero zero...
[3 replies] Last: Thank you Moschops and vlad for answers. I have changed my code , i ... (by vequalsitr)
if i was to SET a object variable where would i do it, and could i use a function tooh?
 
so i want to change posx and posy using changepos (i will use setpos next time) but when im declaring the object where i put the parameters for posx and posy a...
[6 replies] Last: How can i declare a 2d array in class? i tried a few things #include... (by devonrevenge)
Problem with functions?
 
I'm trying to write a calculator using functions, but I can't get it to work! The answers are not printing #include<iostream> using namespace std; ...
[2 replies] Last: Hi there... return a+b; cout << "The sum of " << a << " and " << a <... (by Aceix)
October 2012 Pages: 1... 3435363738... 84
  Archived months: [sep2012] [nov2012]

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