Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Lecture 2 | Programming Abstractions (Stanford)

Loading...

Sign in or sign up now!
75,726
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jul 17, 2008

Lecture two by Julie Zelenski for the Programming Abstractions Course (CS106B) in the Stanford Computer Science Department.

Julie describes the similarities between C++ and Java, which include general syntax, primitive variable types, operators and control structures; she proceeds to go through the code of a basic C++ program and explains each individual piece of code, headers, global constants, global data types, and calling functions. She also proceeds to write a simple program during the lecture that gets input from the user and prints a statement to the screen.

Complete Playlist for the Course:
http://www.youtube.com/view_play_list?p=FE6E58F856038C69

CS 106B Course Website:
http://cs106b.stanford.edu

Stanford Center for Professional Development:
http://scpd.stanford.edu/

Stanford University:
http://www.stanford.edu/

Stanford University Channel on YouTube:
http://www.youtube.com/stanforduniversity/

Category:

Education

Tags:

Download this video

LICENSE: Creative Commons (Attribution-Noncommercial-No Derivative Works).

For more information about this license, please read: http://creativecommons.org/licenses/by-nc-nd/3.0/.

High-quality MP4 Learn more

  • likes, 10 dislikes

Link to this comment:

Share to:

Top Comments

  • she forgot to use : using namespace std, if you forget this you have to type std::cout and std::endl

  • the libraries and code can be found at

    stanford.edu/class/cs106b/inde­x.html

    and

    see.stanford.edu/see/courseinf­o.aspx?coll=11f4f422-5670-4b4c­-88

see all

All Comments (90)

Sign In or Sign Up now to post a comment!
  • @ShadowSky24 WAIT A SECOND, how stupid I am. No dude, she is right. It's a method prototype and takes an int, it's not using the function. Geez, I am embarassed xD

    I guess you know now (since it's been two months) why the code is right.

  • @XzGameTimezX I think she wrote it directly to the presentation. She did say she might confuse syntaxes. In Java the first letter in a variable/method is often lowercase.

  • @XzGameTimezX Wrong. The function parameter variable name does NOT need to be given the same name as the variable that is being passed in to it. It could be "int placeholder" for all it matters, since it is a duplication of the original variable. The only thing that matters is that her declaration of "cont int NumScores" matches her reference to it when she passes it in to the function, which it does.

  • @NorthEastAlbo I assume "using namespace std;" is contained in "genio.h"? If that's the case, why not just include iostream in there as well? Seems strange to me. Oh well.

  • @alfaalfa99 Try Geany. Fastest way to create small C++ programs.Like Dev (or the new/improved ver, wxDev-C++), u dont need a darn project to make a small prog. Its better, tho

  • @brashodan Visual Studio is best for hard-core programmers (Code::Blocks prolly 2nd, imo). Geany is by far the best for students/newbies. For Windows, that is.

  • @alfaalfa99 i think dev C++ is archaic compared to code blocks :D

  • @AGYETECH Oh god! Is people still using Turbo C++?! That's madness, madness I say!! 8D

    By the way, you can use Dev-C++, it's free, for Windows, easy to use and not that archaic. =D

  • I think using these custom libraries is not a good idea for beginners. Best to stick with standard at first.

  • I'll stick with COBOL.

View all Comments »
Loading...

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