Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Help with C++ compiler (newbie)

  1. #1
    Member
    Join Date
    Jun 2003
    Posts
    57

    Help with C++ compiler (newbie)

    Hello,

    I have been trying to learn C++ as my first lang. I d/l'ed Dev-C++ as my compiler, and I was doing pretty well the past few days, getting very small programs to work. I was finally getting used to some elementary syntax, etc., but now, I'm having a problem with my compiler. I had a simple program that started with #include <iostream.h>. After compiling the prog, a tab appeared that said iostream.h. I clicked on it, highlighted all the info in the window, and deleted it all to see what would happen. Following that, the cout function in my little prog would not be recognized (I understand that cin and others wouldn't either, but I wanted to see this for myself). I didn't save anything, to my knowledge, but quit the program, and started it back up. Now, I cannot get any little progs to recognize the #include <iostream.h> function to work, and cannot figure out how to get the compiler back to its default state. The tab no longer appears upon compiling any of my crappy little programs. Does anyone have any advice. I could get a new compiler, but don't want to spend any money until I learn the language a little better. BTW, I have posted this on the Dev-C++ forums, as well, but I trust the brains that visit these forums a lot, as no one's done me wrong yet. Thanks a ton, sorry for the long post.

    Corn

  2. #2
    Senior Member
    Join Date
    Jun 2002
    Posts
    394
    i'm guessing that little tab you clicked opened the iostream.h file. and then you deleted its contents and compiled, saving changes in the process.

    in short, you will have to get the iostream file again, from a website or by reinstalling Dev-C++
    Hmm...theres something a little peculiar here. Oh i see what it is! the sentence is talking about itself! do you see that? what do you mean? sentences can\'t talk! No, but they REFER to things, and this one refers directly-unambigeously-unmistakably-to the very sentence which it is!

  3. #3
    Member
    Join Date
    Jun 2003
    Posts
    57

    One more question :)

    Thank you very much for the reply. I googled, and found an iostream to DL amidst a lot of stuff that was way over my head, at this point. If you are at all familiar with this compiler (or if there's some sort of standard), to where do I place the contents of the DL? There's a folder called 'include,' in the Dev main folder. Would that be the likely spot? All of the files I DL'ed are named something similar to EX_F01, or EX_I41, and i can find no similar names in any of the folders, though they do appear to be of the same file-type. Thanks again for putting up with such an elementary question.

    Corn

  4. #4
    Just save your projects and reinstall Dev C++... that would the easiest way.

  5. #5
    Member
    Join Date
    Jun 2003
    Posts
    57

    Thanks all

    I am going to follow that advice, as everything worked before I did the bad thing. As I've been hunting around looking for answers, I've come across new standards for certain commands. It seems that <iostream.h> is now obselete, giving way to <iostream>, according to one guy who flamed me for asking a simple, kindly-worded question. The tutorial through which I've been walking myself was posted on various pages here, but still uses the old notations. Will this seriously hinder my learning, if I follow the (presumably) outdated tutorial at http://www.cprogramming.com/? Thanks again

    Corn

  6. #6
    Senior Member
    Join Date
    Oct 2001
    Posts
    385
    don't worry about it being outdated (yet). <iostream.h> is part of C, which is what I presume you are learning, while <iostream> is part of C++. You can learn most of what you need to at this point through C - basic programming, programming habits, structures, concepts, etc.. Later you can move onto C++ which will bring into your learning OOP (object oriented programming). C is still a largely prevalent programming language, and there is likely more help available for it than C++.

    EDIT: <iostream.h> is an older form of <iostream> in C++, not C as I had said. It should still not have an effect on the learning process of C. Thanks to IceStorm for the correction.
    Preliminary operational tests were inconclusive (the dang thing blew up)

    \"Ask not what the kernel can do for you, ask what you can do for the kernel!\"

  7. #7
    Member
    Join Date
    Jun 2003
    Posts
    57

    Thanks all

    Thanks everyone. I reinstalled Dev-C++, and it works now, so I'm back on track, doing my best to struggle through this. Oh, such a long way to go...

    peace

    Corn

  8. #8
    if this happened to me i would back up all of my important prog.'s that i wrote and then re-install dev-C++... this way if your compiler wants to delete the folder your apps are in it cant do that.
    You laugh because im different, i laugh because your all the same.

  9. #9
    Junior Member
    Join Date
    Aug 2003
    Posts
    3
    What's the difference between <iostream> and <iostream.h>?

  10. #10
    Banned
    Join Date
    Mar 2002
    Posts
    594
    <iostream.h> is the old version of <iostream>... as far as I know, nothing is different expect that <iostream.h> implies the line "using namespace std;"

    Let me clarify a few more things. As I see it, iostream.h is the standard format for C programs when iostream is more appropriate for C++ (OOP and stl). However I don't see how it's better to use iostream over iostream.h unless you're dealing with before-mentioned OOP and stl. You can still use iostream.h in C++ programs, but I'm not sure if you'll still be able to use the stl functionality.
    From: http://www.neuronentertainment.com/u...ML/000082.html

    But this is by far the best page I found with an explanation: http://www.experts-exchange.com/Prog..._20623034.html

    jag291

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •