alright alright, now i got it, and thanks for the alternatives.
generate_n with back_inserter are very new to me :)
Type: Posts; User: Scatman
alright alright, now i got it, and thanks for the alternatives.
generate_n with back_inserter are very new to me :)
Hi all,
i was doing the following:
for (int i = 0; i < numbers.capacity(); i++) {
numbers.push_back(rand() % 30);
}
understood, so i cannot ignore "Nothing", the program needs something to ignore
thanks a lot
Hi all,
after googling a bit, i found out, that ignore after getline is not necessary, however, i had the following code:
cout << "Enter your name: ";
getline(cin, name);
// cin.ignore();...
alright, got it, thanks a lot
Hi all,
if i have the following
a header file called "temp.h" :
#ifndef TEMP_H
#define TEMP_H
double to_celsius(double fahrenheit);
#endif
Thank you guys, it works,
although i thought, the compiler would see that i am not using output_file in case 'x' here und hence would not complain
Hi all,
i have a switch command. and in case the user enters the command 's' (save), i create an output file, and save the data..
but then a compile error was given as "transfer of control...
Thanks for the hints, i will try it
i am not trying to make sense of anything, it was just for the sake of exercise (how would i solve if i had to :))
Hi all,
i have created a text file:
100
200
three hundred
400
That makes a lot of sense, thanks a lot, a very useful info :)
Hi all,
i was trying to type the same program from a book that does the following:
Program requests to enter a number 0 -100.
The program checks if the entry is valid, if not, the faildbit...
Hi all,
I just reached the overloading chapter, amazing and confusing :).
so i tried to overload the pre and post increment operations. So i did the following:
Simple class:
class Counter...
Ooooh yes it makes sense :)
thanks a lot
Hi all,
i have difficulty understanding the following :
i have two classes : Point and Rectangle.
class Point // holds x,y coordinates
{
Not easy to see that as a beginner...thanks Laserlight--
@Zeus_ : i have good experience with geeksforgeeks, will take a look at it, thanks a lot
Hi all,
i am studying a C++ book. Now i am having the chapter struct..so slowly going to classes. The book is ok, makes, but makes me angry from time to time, because the guy mention sth new but...
oook. Understood. thanks.
is there an advantage of the new syntax again the old one?
Hi all,
i am using Microsoft Visual C++ 2010 Express
i am sure, a super easy question. i am just learning C++...and i am already stuck with this error...here the simple program
#include...
Seems to be a good book, but too expensive :D..will check in a library
Accelerated C++ and my browsing of C++, i have now...hopefully i will enjoy them aslo :D
thanks
Hi all,
Thanks a lot for your replies.
@Catacombs : sounds good but coudnt find it, do you have a link for that book ?
@Niccolo : a great explanation with examples, just perfect, thanks...
Hi all,
I have finsihed the C book ( Sams teach yourself C in 21 days, old revision). it's a nice book. I am not a beginner but also not an expert.
i also want to start learning C++.
However...
Hi Catacombs,
Yeah that is a nice idea, to just think of real scenarios in daily life :)
thanks and good luck :)
Hey cooper,
no never heard of "project Euler", i will take a look at it,
yes i have done lists, but so far only single, and that is what of he topics i want to improve with some exercices....i am...
Hi all,
i was learning about C since a while.
I used the book (Sams C in 21 days). It's a bit old, but good.
I typed all the code examples, read almost everything. I feel like i know the basics...