Thread: Completly new to C++

  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    6

    Completly new to C++

    I am completly new to C++, and I just downloaded the Microsoft Visual C++ thing. I'm quite confused with all the tutorials, as I can't seem to find any files named iostream.h anywhere, and whenever I try to do the stuff in a tutorial, and complie it, I get about of errors about #include stadfx(or something like that). Any help is appreciated.

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    255
    eh did you download .net? if you did you may have some problems C++.net and C++ are TWO different things

    .net generates that error and seems to need that stdafx.h

    but if its .net then the tutorials on this site are a LITTLE outdated and not sure if they will run or not

    if you use visual studio 6.0 you will have no problem
    hooch

  3. #3
    Registered User
    Join Date
    Aug 2005
    Posts
    6
    Quote Originally Posted by ssjnamek
    eh did you download .net? if you did you may have some problems C++.net and C++ are TWO different things

    .net generates that error and seems to need that stdafx.h

    but if its .net then the tutorials on this site are a LITTLE outdated and not sure if they will run or not

    if you use visual studio 6.0 you will have no problem
    I'm not sure if it's .net or not.

    Microsoft Visual C++ Express Edition Beta 2005.

  4. #4
    The N00b That Owns You!
    Join Date
    Jul 2005
    Location
    Canada!
    Posts
    178
    ello i used to be a noob i consider myself now as an average programmer id be glad to help you out AIM = deathbydesire101 MSN = [email protected]

    and i HIGHLY suggest against Microsoft Visual C++(.Net or not) its a gay dumb IDE that does all the work for you and the beta sucks more than i can tell you id advise Dev C++ can be fouund (for free) at www.bloodshed.net
    New Function!!!!

    glAddIdol(C+noob);

    The feeling of rusty spoons against my salad fingers is almost ORGASMIC

  5. #5
    Registered User
    Join Date
    Nov 2001
    Posts
    255
    2005 yea thats .net

    STRAY AWAY FROM .NET

    microsoft 6.0 works fine i like easy simple to use

    but to get the code to work on .net

    copy and paste whatever was on the tutorial BUT you'll notice it created files above int main( ) leave those files there then below that paste over the int main( ) with what was on the tutorial

    so just make sure the .h is with the other .h header files and the int main is below that

    then IT SHOULD work i think you just have to leave all the header files that .net auto makes including that .dll file up there and then add whatever else below it
    hooch

  6. #6
    Registered User
    Join Date
    Aug 2005
    Posts
    6
    Quote Originally Posted by ssjnamek
    2005 yea thats .net

    STRAY AWAY FROM .NET

    microsoft 6.0 works fine i like easy simple to use

    but to get the code to work on .net

    copy and paste whatever was on the tutorial BUT you'll notice it created files above int main( ) leave those files there then below that paste over the int main( ) with what was on the tutorial

    so just make sure the .h is with the other .h header files and the int main is below that

    then IT SHOULD work i think you just have to leave all the header files that .net auto makes including that .dll file up there and then add whatever else below it

    I'm using Dev-C++ now and it's working much better

  7. #7
    Weak. dra's Avatar
    Join Date
    Apr 2005
    Posts
    166
    Quote Originally Posted by Scott B.
    I am completly new to C++, and I just downloaded the Microsoft Visual C++ thing. I'm quite confused with all the tutorials, as I can't seem to find any files named iostream.h anywhere, and whenever I try to do the stuff in a tutorial, and complie it, I get about of errors about #include stadfx(or something like that). Any help is appreciated.
    As another piece of advice, don't use iostream.h. It's old, and does not conform the current C++ standard. Use the header without the file extension instead.

  8. #8
    Banned
    Join Date
    Jun 2005
    Posts
    594
    Quote Originally Posted by Scott B.
    I'm using Dev-C++ now and it's working much better

    BS to you, and BS to the other person.


    Visual Studio .NET is great compiler/ide

    Visual Studio 6.0 you should be staying from,
    because it is old and out dated, and dont comply with
    alot of standards.

  9. #9
    Registered User
    Join Date
    Nov 2001
    Posts
    255
    yes but .net isnt portable and 99% of online C++ is C++ not C++.net cause it wont work on any computer and the beauty of C/C++ is the portability well one of the great things about so yea the .net version is a bit sucky

    not dening .net certainly is a great idea i mean blending several langauges together without the hassle of linking them together through different compilers truely a great idea but if your learning C++ learn C++ not the horrid .net version

    and yea the DEV compiler that works too
    hooch

  10. #10
    Banned
    Join Date
    Jun 2005
    Posts
    594
    yes it is 100% portable, unless you use managed c++,
    and allow for the use of .net framework

    you can create a c++ program in .net without it
    haveing to do with anything of the .net framework

  11. #11
    Registered User
    Join Date
    Nov 2001
    Posts
    255
    well when i sent unmanaged C++ without the .net framework it didnt work so not entirely true

    you need the framework for either version if you compiled it using the .net compiler

    windows programming go with .net otherwise stray away i am using .net for school and i hate the lack of portable feature. i dont mind .net itsself just C++ is more useful than C++.net so i dont want to learn the .net version simple as that and websites rarely if ever teach the .net version so theres less outside help and the book we used is in the next eidtion switching back to regular C++ because the .net version just didnt sell as well. its simply put learn regular C++ not the .net version

    .net may be a good compiler but dont confuse its langauges with the actual langauges themselves aqnd dont expect it to work without the framework
    hooch

  12. #12
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    My preference: GCC (which is the compiler that comes with the Dev C++ IDE).

    That said, I have not used VS .NET myself, but it is supposedly fully standards compliant, meaning if you write standard C++, it'll compile elsewhere (such as on GCC). It should be a fine compiler to use.

    VC++ 6 is not standards compliant, and will compile a lot of things which it shouldn't. Do not use it.

    Your problems with VS .NET (if you are talking about transferring compiled executables from computer to computer) likely stem from missing DLLs on the target computer (assuming you are using compatible operating systems). You'll have to look through your documentation for the compiler to fix this. You can probably statically link the libraries, and fix the problem (and make sure all managed C++ options are turned off).

    Dev C++ with GCC is likely easier to set up and use right away, but .NET is a good compiler as well.
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  13. #13
    Registered User
    Join Date
    Nov 2001
    Posts
    255
    probably or just not use it for C++ like normal people lol

    though i thought it wasnt compatiable cause .net framework translates all code to the same langauge some microsoft langauge using .net framework like some kind of virtual memory thing so if its not there nothing can translate this alien code and so it goes bad and doesnt work. thats my teacher told me anyway which is also how it unifies several otherwise foreighn langauges as one

    oh and .net is 3 GB's big that other one is what 10mb's lol

    what does VC 6.0 compile that it shouldnt? i havent had much trouble with it before?
    hooch

  14. #14
    Registered User
    Join Date
    Jan 2005
    Posts
    7,366
    >> well when i sent unmanaged C++ without the .net framework it didnt work so not entirely true

    Then you did something wrong. Visual C++ 2005 can compile and create pure C++ applications that do not use the .NET framework.

    If you have Dev-C++ and VC++ 2005, do not use VC++ 6.0. Since VC++ 2005 is a beta, then you probably don't want to do real production work on it, but if you are just learning, it might be a better IDE and debugger than Dev-C++.

    To write a simple console program in VC++, create a new Win32 Console application and make sure you check the Empty project option in the wizard. This should remove the need for stdafx.h, and should set the Use managed Extensions option off.

    If your tutorial uses <iostream.h>, consider getting a new tutorial. Don't switch to a compiler that supports the non-standard code given by the tutorial, switch to a tutorial that provides standard code.

    >> what does VC 6.0 compile that it shouldnt? i havent had much trouble with it before?

    There are lots of things that don't follow the standard and that require special code just for VC++ 6.0. Many of them involve templates. There are also little things like scope of a variable declared in a for statement, return value of the main function, etc.
    Last edited by Daved; 08-15-2005 at 10:16 AM.

  15. #15
    Registered User
    Join Date
    Nov 2001
    Posts
    255
    ok i did win32 console applicated clicked empty project and now i have no file to start out in? arent these things supposed to start you out with a file? and the options to click on they all say they include a stdafx.h with it....although i dont even the see the file with this one so who knows?

    2003 version

    the tutorials on this website are outdated lol
    hooch

Popular pages Recent additions subscribe to a feed