Visual C++ 2010 Express Tutorial 4 - Functions

preview_player
Показать описание

This video tutorial shows how to make functions. The code and app will be built upon the code from the previous tutorial in this series.

Рекомендации по теме
Комментарии
Автор

@askmiller

This is a pretty basic example of functions and the example was written to keep it as simple as possible for beginners to VC++ who are trying to self teach.

In most cases, a developer will create a function for any task that is normally done multiple times and/or from multiple places in the code.

The CalculateInches function could be called from other places as well like from a menu option. In that case, the code would already be there to be re-used instead of written again.



patrickmoe
Автор

@VimtoUK Start Debugging (Run) - When the project is running, go to the Debug menu and find Windows (Windows might in a different location, in the Debug menu, in C++, when compared to VB) inside of the Windows submenu is Call Stack and Autos.

SchoolFreeware
Автор

@SchoolFreeware Hi thanks for these tut's im just starting to get into this as ive wanted to do programming for ages and these are really good to me understand thanks

darnleyboi
Автор

Sweet tutorials man! Thanks!

Is the reason why you had the line System::String^ instead of just String because it isn't a standard data type? Or was it for another reason?

dcyli
Автор

Nice tutorial.

I'm a VB.net programmer but decided to watch this as I might start coding in C++ next year.

One quick question, if a value needs to be carried over to a textbox, do you have to convert the integer value to a string (system::string) to avoid errors, or can you just assign the integer value returned from the function in the first place ?

subsmeplease
Автор

Does anyone know how to declare a global variable and how to identify a variable as being "Greater than" or "Less than" a number in Visual C++?

TonyZhu
Автор

Thank you very much for the tutorials.

juleshshrestha
Автор

These are great, thanks! QQ - how are you getting auto complete variables to work? I keep getting told C++/CLI does not support ctrl+space...

infinitychic
Автор

@macomputersuck select the line you want to put a breakpoint on and press F9

Matejthedinosaur
Автор

Your work is greated appreciated! I Watching your video helped me alot!

liutianyu
Автор

I do not understand what System::String^ is or why you used it. It would be great if you could clarify this more!

BioORII
Автор

ok, i have a question i want to know if som1 has a logical answer. so you said this like organizes it, but why would som1 go through the trouble of making a function when it is easier to just keep it the way it was before this tutorial.

askmiller
Автор

hello im 16, and i want to be a games programmer or designer, should i watch your tutorials? or should i wait until i go to uni because i find it hard to understand

jeremiser
Автор

@jeremiser if it's too hard for you i suggest you start with easier programs (like Flash 8)

Matejthedinosaur
Автор

Great tutorials. I'm using Visual Studio 2010 and can'f ind how to show the Autos and Call Stack at the bottom of the screen during debugging, can anyone help?

Vim-Wolf
Автор

When I tried to Build The tutorial 3 example, I get an error saying "Access is denied" . Why is that?

enguember
Автор

please how to deal with strings and arrays, i need it so badly thanks

ibtihelhacheni
Автор

For some reason, my program(the same one being told here keeps going out of response after the first conversion. after removing the break point, it worked??? What is going on?? Is this normal behaviour or what??? Based on the Locals window( i don't know what else to call it), the input variables got the entered values but the iConvertedFeet value is 0. Is this normal??

jhunkubabu
Автор

why in visual c++ string is declare as" system::string^sConvertedval "
why can't we simply declare as "string sConvertedVal" as in c++.

priyanshu.sharan
Автор

i dont know, it worked well with variables and debugging, but adding a function it shows two errors.

studio error C2062: type 'int' unexpected
studio error C2334: unexpected token(s) preceding '{'; skipping apparent function body
studio error C3861: 'CalculateInches': identifier not found
Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped

what could it be, im new to programming

georgemussa
join shbcf.ru