Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

help with visual c++


  • Please log in to reply

#1
island-boy

island-boy

    Member

  • Member
  • PipPip
  • 24 posts
Hi, I just started learning c++ (am learning switch and if statements now)

anyway, I downloaded visual C++ express from microsoft.com as my IDE compiler and linker.

I tried to do some simple codes like Hello World,
the first few times when I debugged the program, the debugging worked, opening a dos window to show my work.

after a few more tweaking, when I tried to debug the same program, an error occurs, the pop-up says : This application has failed to start because MSVCP80D.dll was not found. Re-installing the application may fix this problem." What does this mean? and why did the debugging work at first, but not now? Its kinda frustrating cause I understood the book I'm reading, but am actually having a hard time programming because of this. Help please!

also, I have a few questions regarding C++,
1. what's the difference between int main (void) and int main (const int &)? the former is what the book I'm reading recommends but I haven't reached the part explaing what this means yet.

2. The codes I'm learning all results to opening windows in msdos to display my work. Are there any codes to make windows pop-up in the windows environment instead of dos? I know this is kinda a stupid question :tazz:

3. Before I used the microsoft visual c++, I was using dev c++, however the reason I gave up on it, is that unlike microsoft visual, when I debugged the code I worte in dev c++, my output won't display (i.e., no dos window opening up to show my output. Why's this?


anyways, thanks for the help. Please do understand I'm a newbie in c++, having just started learning 5 days ago.

Edited by island-boy, 11 October 2005 - 12:30 PM.

  • 0

Advertisements


#2
chickenman

chickenman

    Member

  • Member
  • PipPip
  • 37 posts
First off Do not use any compiler made by microsoft, they are full of bugs, use dev-cpp which is free and very good.

For your first question, just use int main() don't put any data in the ( ) unless you need to for command line arguments.

For your second question, You need to learn how to use the windows API, it only uses DOS because you have no other terminal things installed, the program is still a WIN32 one.

For your last question, I think it does did you enable debugging in your program and turn off the strip executable option, that will be in the compiler options. :tazz:
  • 0

#3
island-boy

island-boy

    Member

  • Topic Starter
  • Member
  • PipPip
  • 24 posts
Hi, thanks for the quick reply,

I uninstalled microsoft visual c++ and downloaded dev cpp again.

according to the options, strip executable is turned off.

I still can't view the result of my Hello World code.

You just write the code code, compile it, then debug it right? How do you view the result of your code?

I know its kinda a dumb question :tazz:

Thanks.
  • 0

#4
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 876 posts
are you still having a problem?

strip executable is turned off


FYI - strip executable is turned off on devc++ on my PC
  • 0

#5
island-boy

island-boy

    Member

  • Topic Starter
  • Member
  • PipPip
  • 24 posts
kind off, I stopped experimenting with c++ and have preceded with reading the rest of the book (functions and pointers sure are confusing :tazz: )

anyways, I'll try experimenting again starting next week...I'll be sure to ask for help then, thanks
  • 0

#6
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 876 posts
don't worry about pointers, yet. they can be very confusing at first.

here's a tutorial on c that I found yesterday. try to fully understand lessons 1-4 before going on to pointers.

http://www.learn-pro..._c_learn01.html

whenever you start a new language, always make sure 'hello world' works before trying any other code. once 'hello world' works, you can feel confident that your environment(dev-c++) is set up properly.
  • 0

#7
island-boy

island-boy

    Member

  • Topic Starter
  • Member
  • PipPip
  • 24 posts
hey thanks for the link to the site :tazz:

I have a question though as I have finished reading my how-to book, since the book and the web site you linked to teaches only up to structures, classes, and writing text files. If I were to able to master them, is it enough to say that I have mastered c++? Or are there more advanced lessons that I need to study next?

thanks again

Edited by island-boy, 22 October 2005 - 10:04 AM.

  • 0

#8
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 876 posts
I'm happy to hear you finished your book.

the link to the tutorial covers the basics of c. there is a lot more to c, but this will get you started. once you have 'mastered' the content of that tutorial, you can move on to c++.

there are more c++ references here:
http://www.geekstogo...showtopic=19307
  • 0

#9
island-boy

island-boy

    Member

  • Topic Starter
  • Member
  • PipPip
  • 24 posts
Hi, a quick follow-up question, does c++ teach you to create programs that are windows friendly, kinda like the ones being done in visual basic?

What I mean, is does c++ teach you to create programs that can be run in the windows environment, as oppossed to the dos environment? thanks
  • 0

#10
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 876 posts
someone else will have to answer visual basic questions - I haven't used it.

c++ is a programming language - it doesn't 'teach'.

what you get once you compile code is a .exe file which will run in a dos window. as for the 'windows environment', there is windows-like code, but I haven't use it. perhaps one of the c++ gurus can give more info/links on 'windows environment'. time to use google - I'll post any promising links.

EDIT:
this looks like a good place to start - 'hello windows'
http://www.relisoft....k/win/index.htm

Edited by bdlt, 22 October 2005 - 12:06 PM.

  • 0

#11
island-boy

island-boy

    Member

  • Topic Starter
  • Member
  • PipPip
  • 24 posts
hey thanks for the quick reply.

yep, I do get that c++ is a programming language, guess I used the wrong word (teach) there :tazz:

I was just curious cuase I'm thinking nowadays dos is becomming more and more obsolete, heck, I would bet a lot of people don't even know what dos is :)

I also found the tutorial on about.com on c++ to be quite comprehensive.
  • 0

#12
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 876 posts
check out the link in post#10 under edit.

you're right about dos being phased out. some dos commands still run on xp, but not the full set that was on win98.
  • 0

#13
island-boy

island-boy

    Member

  • Topic Starter
  • Member
  • PipPip
  • 24 posts
hey, great link *thumbs up*

although glancing at it, I see it may be a little too advanced for me, after all, I just started studying c++ 2 weeks ago...I'll study it eventually though.

thanks again :tazz:
  • 0

#14
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 876 posts
you're welcome and good luck
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP