m a new member n just started to learn c++. so please help me out... its simple
I read in 1 of the replies that
is obsolete.... n one can use
But wen i tried it in d program it does not included file..
expectin replies... :twisted:
do reply.. thanxs ;)
what compiler (and version) are you using? What is (are) the error messages?
after including the C++ stl header files you need to declare the namespace
#include <iostream> ... other header files here using namespace std;
Compiler used by me is turbo c n d msg appearin is like no prototype for cin... thanxs 4 d help ;) ... i had asked my frnd abt it n now wat i understand is
using namespace std
mins include d definitions of d functions or watever is ther in iostream wich r defined in the specified namespace i.e. y we rite using namespace isn't it???? :?:
>Compiler used by me is turbo c
Turbo C is neither a C++ compiler, nor new enough to know what the C++ standard even is. Get something that isn't a complete dinosaur, like Dev-C++. There's no point in trying to learn C++ on a dead compiler; it'll just frustrate you.
Dev-C++......... :-| i dunno wat is dev-c++ so better u tell me abt it.. ;) n y is c++ a dead compiler s we r bein taught c++ on the turbo compiler... n i read ur reply to the thread abt atoi.. i hven't read the thread but i read ur reply... so well wat is d problem with the getchar s u said it in the reply..
thanxs for the reply n expectin u 2 reply back..
>i dunno wat is dev-c++ so better u tell me abt it..
How about you just google it like the rest of the civilized world?
>n y is c++ a dead compiler s we r bein taught c++ on the turbo compiler...
Turbo C++ is an old compiler that was released before the current C++ standard. As such, you can't write proper C++ with it. If you're learning C++ on Turbo C++, you're screwing yourself because you'll have to unlearn half of what you're learning now, then learn the tons of new concepts and features of modern C++ when you realize that you never really learned C++ in the first place.
>so well wat is d problem with the getchar s u said it in the reply..
I was referring to the name. getchar suggests that it returns a char when it really returns an int. This causes a lot of people (including at least one notable author) to fall into the trap of infinite loops caused by EOF (a negative quantity) being returned from getchar but saved to a char when char is unsigned.
By the way, not everyone is a native English speaker, and your childish abbreviations and poor grammar would make your posts virtually impossible to understand. Not to mention that it greatly diminishes anyone's opinion of your intelligence and abilities. Unfair, yes. But that's how it works, and when you put effort into proper spelling and grammar, people are more inclined to listen to you.
hey i believe i did not use that poor english although the abbreviated forms were used... ;) anyways thanks for the help on the rest of the topic and even for the below ... still look for the colour and understand.... ;) :D joking seriously.. look forward to your help later.. thanks again
By the way, not everyone is a native English speaker, and [COLOR=DarkRed]your childish abbreviations and poor grammar[/COLOR] would make your posts virtually impossible to understand. [COLOR=Purple]Not to mention that it greatly diminishes anyone's opinion of your intelligence and abilities. Unfair, yes. But that's how it works, and when you put effort into proper spelling and grammar, people are more inclined to listen to you
Edited by happygeek: fixed formatting
>>n y is c++ a dead compiler
Now, what the hell does that mean? n could stand for any of several dozen words in the dictionary that begin with the letter n. y could also. Those are two very very good reasons people should spell out words -- I can understand bad english, but not that kind of crazy abbreviations. I hope you don't write like that in high school or college English classes!
actually if u read y n(and) why they are heard same!!!
The very very good reason i should spell out words from now onwards-- people can understand bad english, but not that kind of crazy abbreviations.Thanks ... you thought for me and my english n(and)I don't rite(write) like dat(that) in college eng(English classes)!!!!!!!! ;)i have replied sarcasticaly(hope the spellin is right) without ne(any) bad intentions!!
Do give your helpful replies later also...
Edited by happygeek: fixed formatting
>actually if u read y n(and) why they are heard same!!!
Are they? Perhaps in English, but in Japanese "n" is very nasal to the point of being completely voiceless. The sound is very unlike the English word "and". What about "u"? Same thing. In Japanese, "u" is pronounced "oo", which is very different from the English word "you". What about "y"? I don't even have to leave Japanese to tell you that there is no phoneme that matches "y" to the same sound as the English word "why".
That's one non-English example that will cause native speakers to have fits when trying to understand your silly abbreviations. Pick any other language and you'll see similar situations. This isn't text messaging or chat and you can afford to take your time.
>Do give your helpful replies later also...
You must have missed the helpful replies that have already answered your question fully. Yes, <iostream> is correct, <iostream.h> is not, but your compiler is too old. Get a new compiler or realize that you're not really learning C++.
I get everything of what you say :!: ... and so better we shall now onwards discuss some other topics more related to c and c++ :cool: ...I know you replied for the problem of header file but i was refering to future helps.. ;).
I would like you to see a thread posted by comwizz which refers to sorting of lines with pointers..people have replied an alternative code with different concepts but what I would like is you see the corrected code given by him, read all the replies and some more corrections
Intialize pointer y with null
Also replace j with k in the bubble sort having strcmp..i.e. inside the loop while swapping wrong variable is being used.
Now the problem is that the program takes the first line and sorting occurs correctly but while inputing the no of words for the next line in the array the input is not asked by cin it rather takes a garbage value like -28654 itself and then no allocation occurs so cin.getline also doesn't work .
Except this the program runs perfectly. i have tried to intialize the array to zero.
Now please don't ask to change the compiler :( and so as i have to do it in the same compiler and right now with the concept of the pointers and also without any better options like vectors....please do help waiting for your reply :-|
By the way your picture matches you... :lol:
i want to print a persian file by thermal printer..
i can print an english file esily..but i face the proble while printing persian text..
i think i ...
I am working on program that will connect to MySQL database, colect data from table and show them in grid. Where user can edit cell, and then on ...
I'm coding a program to learn OpenGL in C++ (based off of The Benny Boxes tutorials) and I've run into a snag where I don't get any errors, but my ...