Thread: eMbedded visual c++ vs old visual c++

  1. #1
    Registered User
    Join Date
    Aug 2016
    Posts
    10

    eMbedded visual c++ vs old visual c++

    Hi everybody, glad to be here.

    I have an old book written by Gorvich and Gorvich (sorry, not sure about correct spelling) labeled as "teach yourself visual c++ in 21 days and an old notebook with win xp on it. How can i find the old Visual c++ 4 to run the examples and instructions? i downloaded from sites and something like eMbedded appeared in all of them and the menu are quite different than those mentioned in the book.

    More importantly it does not run nor compile. How can i overcome this problem?

    Thanks in advance for any help.

  2. #2
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,739
    Doesn't the book provide sources?
    Devoted my life to programming...

  3. #3
    Registered User
    Join Date
    Aug 2016
    Posts
    10
    It is a translated book from the original English nicely done with very good examples, unfortunately it does not have any accompanying CD.

    What will you suggest? i have been a hobbyist C programmer and during whole time i have written algorithms etc without any attempt to make nice graphical interface or menu etc. i think this book can be a big help.

    One more question plz, if i use non commercial Visual studio 2005 or newer versions then will i be able to practice the book or it is totally different and not follow able?

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    A book which promises to teach you programming in x days, or which locks you to a specific compiler isn't worth reading.

    You also need to distinguish between the following;
    1. The core programming language which is independent of any particular machine / OS / compiler vendor. The ISO C committee basically manages to put out one revision every decade.

    2. The various Application Programming Interfaces (API's) which are supported by your chosen platform. These are far more varied (in feature set, supported platforms, rate of update etc etc). So for example, producing a nice menu structure for your program would depend on the OS specific APIs of your platform. You can save some effort by choosing a cross-platform graphical toolkit. Qt is one, but there are many to choose from.

    3. The Integrated Development Environment (IDE) is basically your compiler / editor / debugger / help pages / resource manager / etc, all rolled up into one big ball. It's a one-stop shop for all your program development needs. So for example, if you wanted to tweak the compiler setup, it might be project->properties in one IDE, and build->settings in another IDE. Once you understand the program development lifecycle, most IDEs are pretty easy to use. Sure, each have their own unique toys to play with, but if you can master edit / compile / debug, you're well on your way.

    Outside of all that, there is the important task of learning how to program to begin with.
    Programs don't begin with people sitting down at the computer and typing "int main" into their chosen editor. Any decent sized program (ie, one which you can't hold in your head all at the same time) needs lots of thought and planning.

    Sure, you can just sit and hack/hack/hack through sheer brute force and determination, but it will be a limiting option.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Registered User
    Join Date
    Apr 2013
    Posts
    1,658
    The non embedded version was named Visual C++ 4.0. Visual C++ 4.1 was similar and also included the 16 bit Visual C++ 1.52 (although it did not include MASM / ML 6.11, or the old 16 bit tools like programmers workbench. I don't recall if it included codeview debugger). You may be able to find a copy of either at amazon or ebay.

    You could probably use Visual Studio Express (for desktop) 2015 which is free. The programming interface has changed, but you should be able to compile old source code examples.

  6. #6
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,688
    Will VS2015 run on Windows XP?

    When I had Vista Home a few years ago it struggled to run VS2012
    and that was on a top machine back then. It may be a bit more viable
    to download 2010 express or even 2008 express - you can still get the
    download exe setup (I think) from their website.
    Double Helix STL

  7. #7
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    VS2015 requires Windows 7+. The fact that your computer struggled running Visual Studio wasn't attributed to your OS, but rather your hardware. Visual Studio is quite demanding in the hardware department (and for no good reason).

    I assume you want to learn C++. The first step would be to throw away that book, get Accelerated C++ and download Visual Studio 2015 Community edition and work through that book. Then you can go for more modern books that mentions C++11/14/17. A book that relies on Visual C++ 4 is just so horribly outdated it's not going to do your any favours. Get a modern IDE and compiler and save yourself some headache.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  8. #8
    Registered User
    Join Date
    Apr 2013
    Posts
    1,658
    If you're running Windows XP, then VS2010 is the last version to run on Windows XP. You can download an ISO file to burn to a cd-rom. This is a Microsoft link to VS2010Express1.iso:

    http://go.microsoft.com/?linkid=9709969

  9. #9
    Registered User
    Join Date
    Dec 2010
    Location
    Trinidad, CO (log cabin in middle of nowhere)
    Posts
    148
    eMbedded Visual C++ 4 is what I use to create applications for the Windows CE data recorders my organization uses. It is strictly for these embedded systems running Windows CE, and the executables won't run on any version of desktop Windows, e.g., Windows 95, Windows 98, Windows 2000/XP, Windows Vista, Windows 7, or Windows 10.

    Microsoft Visual C++ 4 on the other hand is a 22 year old version of Microsoft's compiler. You really wouldn't want to use that. I'm just about embarresed to admit I still install VC 6 on my various boxes circa 1998 or so. Don't use it much, but I've a lot of decent old projects from that era.

    In my opinion your example programs from the book will likely work if you get yourself an up to date compiler. The price is certainly right.

    If I was using Windows XP I'd try to get one of the older Code::Blocks editions. Actually, I'm replying to your question now on a good 'ole WinXP laptop of mine which is one of the best laptops I've ever had. It just passed its 10th birthday in June, and is still going strong! Its an HP Pavilion 17" laptop with AMD Turion 64 bit processor. On it I have Code::Blocks 10.05, which came with the TDM-4.4 series GCC compiler. That would work very well for you if you could get it.
    Last edited by freddie; 08-14-2016 at 09:22 PM.

  10. #10
    Registered User
    Join Date
    Aug 2016
    Posts
    10
    Thank you everybody for helps and replies.

    I am sorry that i did not respond earlier.

    Your answers are mainly based on getting codes to be compiled but i want to find those menu and buttons done. i have been using code::block and just wanted to give Visual C++ a try.

    May i please ask about VS2010? are menus and instructions a lot different than Visual c++ 4? can i follow them? (for example the book mentions things like MFC Wizard and etc, are they really hard to find in VS2010?).

    Thanks again for helps. i should digest these materials that you mentioned and then announce my last solutions.

  11. #11
    Registered User
    Join Date
    Aug 2016
    Posts
    10
    Fellas, i think i solved this problem, i installed Visual c++ 6 and everything is going just fine,

    I would be very happy and thankful if you give me your thoughts on me using such an old version and books. i really enjoy though from making colorful outputs and simple menu and i have successfully run 3 chapters of the mentioned book.

    I also would be happier if you mention some threads that discuss the issues mentioned here. (sorry i am new to this forum and my questions might sound stupid and i dont know dark corners of forum but i will get used to it.)

    Thanks again so much for your replies and helps.

  12. #12
    Registered User
    Join Date
    Apr 2013
    Posts
    1,658
    For basics Windows or console programming, the old book and compiler should be fine. The standard template library has changed somewhat (names of include files, perhaps some functions added or changed). For C++ itself, there have been changes like the addition of lambda functions which are in Visual Studio Express 2010 (and maybe 2008). I don't know what changed in MFC (Microsoft Foundation Classes). You could install Visual Studio Express 2010 in addition to Visual C++ 6.0. VS2010 doesn't change the default environment variables like path, but I don't know about Visual C++ 6.0.

  13. #13
    Registered User
    Join Date
    Dec 2010
    Location
    Trinidad, CO (log cabin in middle of nowhere)
    Posts
    148
    The really fundamental dichotomy you've got to get through and make a decision about is whether you are going to insulate yourself at all costs against the underlying Windows Application Programming interface through the use of C++ Class Frameworks such as MFC, wxWidgets, QT, etc., etc, ad infinitum, or whether you want to tackle Windows on its own low level terms which quickly leads you into a non C++ ish C ish world.

    If you take the former route, every time you ask a question here about how to implement some feature in your application you'll have hurled at you the need for grabbing some library (usually with three letter acromyms such as WTL, MFC, ATL, etc., etc., ad infinitum) that magically 'wraps' the underlying Windows Application Programming Interface functionality that you need. In that way you'll not have to 'regress' into any procedural programming style of which C++ purists take a rather dim view.

    If you take the latter approach as I do you'll have to learn some C isms (such as pointers, function pointers, arrays of function pointers, etc.) and learn the Windows Api Documentation, which is rather strictly C based as are most operating system interfaces. The bright side is that C++ can help a lot in cleaning it up and making it presentable, if not even rather elegant, but that's a matter of opinion.

    If you want to take the former approach I'd recommend you get yourself outfitted with all the latest and greatest stuff such as VC 19 (Visual Studio Community 2015), cuz when you ask questions here about how to do something the answers are going to be couched in terms of Microsoft's wizzards and GUI libraries from that product.

    If you want to stick with those older compilers such as VC 6 you won't be hamstrung as much if you take the latter Windows Api (Application Programming Interface) approach as things haven't changed there very much over the years, except possibly for high end graphics issues.

  14. #14
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    The standard library have evolved A LOT since VC6. Don't think anything else. The C++ language itself has also changed A LOT since VC6. Don't think anything else. You are doing yourself a disfavor by choosing VC6, among them being:

    - The product is outdated and unspported. Run into a big or problem? Don't expect any support. Gotta ask a question? Don't expect anyone to answer them.
    - Less standards compliance from the compiler. Got code compiling? Great! But as soon as you need to ask a question, don't expect anyone to answer them.
    - Want to code for other platforms than Windows? Nope. Not happening. VC6 is strictly Windows only. (Plus there's the standards compliance which means your code most likely won't compile on other compilers.)
    - Want to use other compilers? Maybe you're asked to use another compiler in some work. Well, good luck. Since your code is so horribly out-of-date, the new compiler won't compile it.
    - The compiler is old, so you lose out on new features, compiler optimizations, newer libraries. You miss out on bug fixes, and so on.
    - You will get told to upgrade your compiler if you ask a question.

    This is just the tip of the iceberg. Upgrade that damned compiler!

    Then there's the debate of Win API vs a library. Don't be fooled: I think freddie's view here is pretty extreme. You won't get much improvement over VC6 with regards to the Win API if you choose to do so; this is true. However, you do yourself a disfavour by doing so because all the other code you write that isn't Win API calls will be limited by the compiler. Then there's the debate of whether you should use Win API for your GUI or some library. To be frank with you, Win API is a convoluted legacy C API. There is nothing good that comes from working with it directly. It's horribly complex, hard to use right, does not work well with modern idioms, and so on. You are much, MUCH better off using a modern C++ GUI library. If you use a popular one, you won't have any trouble finding help.

    And this bears repeating: Upgrade your compiler! The latest version of Visual Studio (2015, community edition) is free, so grab it and install it.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  15. #15
    Registered User
    Join Date
    Dec 2010
    Location
    Trinidad, CO (log cabin in middle of nowhere)
    Posts
    148
    To be frank with you, Win API is a convoluted legacy C API. There is nothing good that comes from working with it directly. It's horribly complex, hard to use right, does not work well with modern idioms, and so on.
    That is the concensus opinion, I fully realize, but nonetheless it is still opinion. I suppose I'm an exception to the 'rule', and I accept that I'm extreme in some of my views, but I personally found the raw Windows Application Programming Interface to be much easier for me than the Class Frameworks that wrap it. I just felt the OP needed to be somewhat aware of the issues involved, and I do agree with Elysia that VC6 is a bit old to be learning C++ with.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to create .bat file in Visual C++? Ms Visual Studio 2010
    By rousse101 in forum Game Programming
    Replies: 0
    Last Post: 01-25-2015, 04:55 PM
  2. Replies: 0
    Last Post: 11-20-2013, 01:02 PM
  3. Visual C++ and Visual Studio 2010
    By 03jh01 in forum C++ Programming
    Replies: 5
    Last Post: 10-03-2010, 04:03 AM
  4. Replies: 1
    Last Post: 04-20-2002, 06:49 AM
  5. Moving from Visual Basic to Visual C++
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 04-10-2002, 09:57 PM

Tags for this Thread