Beginners - October 2011 (Page 27)

by KKlax
Sum of 6 integers - How does it work?
 
This is the program: #include <iostream> using namespace std; int main() { int n, sum; cout << "Enter a six-digit integer: "; cin >> n; s...
[2 replies] Last: Oh yes..thanks...that's it. (by KKlax)
Read in a data file into an array, 200 doubles
 
I've never done this with a file of more than four doubles, how do I read in a data file into an array? Do I have to declare 200 doubles to represent each line ...
[no replies]
keyboard input release >.>
 
ok so here is a code i typed up to get simple input from the keyboard. #include <conio.h> #include <iostream> using namespace std; int main() { i...
[no replies]
some easy questions
 
well here some stuff that i didnt get at this code // example about structures #include <iostream> #include <string> #include <sstream> using namespace ...
[1 reply] : This code works fine on my compiler. What line does the error refer to... (by closed account zb0S216C)
What am I doing wrong?
 
.,,
[7 replies] Last: [quote=Formwork]No, only integral types (including char and excluding ... (by stridexr)
by jjj333
Input/Output Streams
 
MMHMM I'm fairly new at this but I just need a little guidance with a program code. What I did in this code was inputing and outputing data files. Which I t...
[4 replies] Last: cout<<"Please enter name of outpout file: "; cin>>name; ofstream ost... (by jjj333)
Not sure if its my compiler or if its the code but Help
 
So anyways i'm not sure if its the code or the compiler that's messed up, and i see no problem with the code itself, the code is below: #include <iostream> #in...
[2 replies] Last: Ok thanks for your help, can't believe i didn't see that. Thanks for y... (by clearner1101)
Is this the shortest way to find Fibonacci numbers?
 
#include <iostream> using namespace std; int main() { int limit, num1 = 0, num2 = 1, num3; cout<<"Enter a limit: "; cin>>limit; do{ co...
[4 replies] Last: Okay, thanks (by voyance)
by unbdd
vector
 
In Stroustrup's C++ book, there is something like: vector<double>* p = new vector<double>(s2) // s2 is an int variable If I want to delete this vector...
[1 reply] : Use delete without the brackets. Wazzak (by closed account zb0S216C)
by squik
what am i doing wrong here?
 
/* Write a program that finds the amount in a savings account after a certain time has gone by. Task 1 Ask the user for the original amount of money, the...
[7 replies] Last: Functions need a return type-specifier, that is, a return type. The co... (by closed account zb0S216C)
by ng1011
Passing a string to a class constructor
 
I'm attempting to create a class to open a file, and read from it, by passing the filename to the constructor. I have searched the web and have tried to replic...
[3 replies] Last: Thanks for the assistance. I finally have it compiling and functionin... (by ng1011)
by aasaa
C++ inhertance
 
hey, why in C++ there is multi inheritance while in java there is only inheretance from one object? what is the assumption that have been made for java? th...
[5 replies] Last: A Java interface has only method definitions and constant static data ... (by mik2718)
Trouble creating a list of class credit
 
Hi-- I am having trouble creating a list in C++ where each element of the list is an object of class credit. Looks to me like the program is having trouble wit...
[2 replies] Last: I have always used char. Very roughly: operators are signs like +, -... (by duggarm)
by Weeve
Iv been learning C++, but how do you manage Sprites using SFML
 
How would I manage my sprite system in SFML if I want to copy/destroy an infinite amount of times, on a basic timer, and treat all the sprites in general, the g...
[1 reply] : Have you tried the SFML forums? http://sfml-dev.org/forum/ (by Danny Toledo)
Help with this problem !!
 
Hey guys I'm taking a computer science 1 course and this problem is killing me. I just have no idea on how to start this. (a) Write a C++ program that reads i...
[7 replies] Last: Also count how many scores are in each category, like int count700,... (by Wonsahm Chung)
by EricDu
How to refer someone's sentence with someone's name
 
I saw you guys can reply a post with following format, but I cannot find a way to do same, how to do it? Is it my browser's problem? I am using Firefox 3.6. ...
[4 replies] Last: [quote=Disch][quote=EricDu]Blah Blah Perfect! Thanks a lot guys. ... (by EricDu)
Reference and pointers in C++?
 
An example of a pointer is int i=10; int *ptr; ptr=&i; here, i was told that the "&" sign stands for "address of"... so the above line should be read as p...
[6 replies] Last: thanks everyone for replying so quickly... ! when i asked the person w... (by network burner)
by JanisM
compile - debug
 
Hi everbody, if question like this has been I'm very sorry. Problem is that when I have installed codeblocks and build a project and want to lunch program an e...
[4 replies] Last: Thank god, it's ok now. Thank you very much (by JanisM)
by Tytrin
Making use of Structures
 
Ok so first off this is not a class assignment in any case. I am trying to figure out how to make good use of my structures since I recently learned to use them...
[2 replies] Last: Yeah, that's the basics, and I had managed to figure out how to make u... (by Tytrin)
MySQL in C++..HELP
 
i want to add MySQL code in C++. I tried a lot but couldn't success. I even download c++ connector, it did not work for me...
[1 reply] : Be more specific? :) (by closed account 10oTURfi)
October 2011 Pages: 1... 2526272829... 59
  Archived months: [sep2011] [nov2011]

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