Added: 3 years ago
From: xoaxdotnet
Views: 59,001
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (87)

Sign In or Sign Up now to post a comment!
  • Thank you very much

  • Me gusta lo estoy siguiendo.. I like I'm following this video.

  • your videos need to be lonnngggeeerrr

  • where can i press this " \ "

    I only got this " / "

    plss help me>

  • @treeky3

    on a german keyboard its on the same position then ? or ß.

  • no using namespace std? I see everyone else doing it.

  • OMG THERE IS NO STRING?!

  • @deluksic A string is just an Array of Characters.

  • @xXAceyboyXx Basically it means the main function has no output. If I remember correctly this is not allowed for the main function, but I'm not sure so don't take my word on that. (There's a reason why I'm watching this video obviously, I'm getting back to grips with C++...)

  • the other videos have a better audio-qualitiy

  • scratch that had return 0 still up

  • how do you keep you window up where it says press any button

    like when i typed g and hit enter i quickly showed the other g

    and closed down?

  • im confused! if char can manipulate numbers, then why bother ever using int?

  • @lolfreak21196 because you might want to use only numbers in your program.

  • nice vids! I even got to my own solution for the program not closing before i could read the output! i just added "std::cin.get();" twice. one in between the first action and one at the end!

  • dude your very good teacher

  • dude, i think something happened to your Mic... :S

  • @TheAlascar

    You would use string but that is not included in the iostream include you will have to add in

    #include -string-

  • void main() vs. int main() ???

  • @petsoukos I believe void means that you do not have to include the "return 0" statement.

  • Thanks, I am now learning Visual C++.

  • It seems to me like double can do everything that int can do, so is there really a point in using int at all? Ever? Thanks, subbed.

    PS: I would be happy if anyone answered :D

  • @qwas12348gr5 Int is faster, you don't really notice it now, but later on you will.

    (XD, that's what my programming teacher says. DOUBLE FTW!!!!!)

  • @TheSpleenmaster

    LOL

    Thanks

  • One word of caution for those who are beginners; the following code would be wrong;

    int ifull;

    cin<<iFull;

    the reason being is that when an int or other variable is declared it is case sensitive.

  • @Magix1reaper its not just variables, everything is c++ is case sensitive

  • i continue to learn because of you.

  • dude, you need waaaay more views than 45,000

    you are like god of c++!

    you totally helped me!

  • you should alter that zoom-in to show that semi colon at the end of the code it took me awhile to find out why the code didn't do anything

  • For those of you who get tired of typing "std::" before everything... just type:

    using namespace std;

    However, when using different functions from a different namespace (such as ios) you need to type the full function out since the code assumes you are always using the standard namespace. If we were using the I/O stream namespace, we would still have to type:

    ios::beg

    Anyways, that's just a little shortcut I thought I should share

  • Thanks! This is really helpful!

  • What data type would you use for words?

  • He gives good lessons but he needs to be more enthusiastic.

  • when I type g and hit enter the dialog dissapears

    what do i have to add/change (i have the same code as you)

    I am using Microsoft Visual C++ 2010 Express

  • @MDSNproductions Hello

  • @MDSNproductions std::cin >> cCharacter; std::cout << cCharacter << std::endl; std::cin.get(); system("PAUSE");

    }

  • @MDSNproductions std::cin >> cCharacter; std::cout << cCharacter << std::endl; std::cin.get(); system("PAUSE");

    }

  • I haven't been able to find the 'any' key...

  • Im getting the hang of it:) a little.

  • Hi

    i did the bool lesson using or || as logical operator, but its accepting only first two conditions and getting executed, if other conditions are added giving error report.....

  • Thank you so much for making these vids! This is really the only place on the net where C++ is explained well but quickly from a beginners standpoint.

  • i will like you use the libreri .stdio for mi wors i dont understen very well

  • Why dont you use namespace std?

  • main must return int??

    you must add this line of code before the end brackets }

    return 0;

    because your main function type is int

  • Teachers really should make these kind of videoes too, and the calm music in the background makes it easier to learn too

  • i have never seen anyone get more love on the internet...

  • When I follow the instruction I get this error?

    `main' must return `int'

    Why?

  • @fayaz0707 I believe that main must ALWAYS return an int value to let the compiler know it built successfully. In other languages I am pretty sure main doesnt have to return int (like Java would be, public void main()) Just safely assume to always use int main().

  • so when should int main() be used and void main() be used

  • @CrimsonTuber Don't use void main()

  • your smart

  • @gmodrox000 ha ha ha

  • instead of adding: system("pause"); in the end,

    you could add: system("pause > nul");

    this will do the same, but it wont make any text.

  • When I used the cin.get and return 0; My program would still shut down after printing the g's. If this happens to you, you can use this instead of cin.get,

    system("PAUSE");

    return 0;

    I like it a lot better.

  • Is the background song from The Legend of Zelda? LOL...

  • @materboy5 haha later on u will need to switch it back to void >8}

  • std::cin.get();

    return 0;

    Is not working because it thinks I press enter twice orso...

  • @ordiantakeover bullshit, your main function starts with ...VOID main...

    for a void function you dont need to return something. try to replace void with int. that should work

  • @LygisLT15 I agree with you, I am following these lessons using a Mac with Xcode and I tried the first example and i got an error that 'main' must return int. Void does not work. Then I tried 'int main' and it worked just as well. You know your stuff.

  • Didn't get what's ">>" and "<<" stands for..

  • why dont you need

    return 0;

    for this one?

  • @mtdeezy Because the main function is declared as void main(). The other ones were int main(). void means no return value. int means return an integer(whole number). void functions can return at any point by putting in return;

  • He says zero and one correspond to true and false respectively. This is wrong. It should be the other way around, true is one and false is zero, as in the program on screen. Commentary wrong, program right.

  • When i Press Enter i just Shuts down plz help

  • @Schoening91

    do you have MSV C++ 2010?

  • @sfplayer911 Yes but now i Figured out. i use "INT" instead of

    "VOID" and end with:

    std::cin.get();

    return 0;

    Right?:P

  • @Schoening91 You can remove std:cin.get();

    VOID tells you, that a function doesn't have any returning values. In your case, your function is an INTeger function and have to return a number, like, in example a BOOLean function has to return TRUE or FALSE. I don't really remmember, but I think the compiler throuws you an error if you don't return something.

  • dissforlife, because he havent added any options in main funktion.

    Im lithuanian, hoply you understood me ;D

    I love your lessons!

    C++ im back!!! <3

  • @LygisLT15 I'am a Lithuanian too xD

  • @LygisLT15 a

  • he is baked xD

  • u guys are awesome, i wanted to learn C++ and i understand mostly everything that you are teaching.

    so great job!

  • wow this guy is realy kool

  • Great tutorials, I got offset in my C++ studies and needed to catch up, this has been helping a ton :)

    Why exactly is the function "void" instead of "int" this time around?

  • I was wondering the same thing, but I'm sure it will be explained later bro.

  • @HighlyBored

    I got it like a week ago xD

    The prefix to the program is its return type, so if I do int main() and inside I have it say return 1; when I call the function it returns one. Void doesnt return anything.

    I think :D

  • Correct. Void means it doesn't return anything.

  • because it doesn't return anything. notice it doesn't have "return 0;"

  • @dissforlife the datatype before a function the value the function will return. void will return no value, and int will return an integer value

  • A void return type on main is non-standard and should be avoided.

    Standard conforming signatures for main are:

    int main()

    int main(int argc, char** argv)

    int main(int argc, char* argv[])

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more