• About Us
  • Classroom Training
  • Online Training
    • Self Paced Courses
      • Android Development for Beginners
      • HTML and CSS For Beginners (with HTML5)!
      • Javascript for Beginners
      • C Programming: iOS Development Starts Here!
      • Objective C For Beginners
      • PHP MySQL For Beginners
      • Web Development Code Camp
    • Live Instructor Courses
      • HTML and CSS with HTML 5 (Live)
      • Javascript for Beginners (Live)
      • C Programming for Beginners (Live)
      • Objective C for Beginners(Live)
      • Android Development Code Camp (Live)
      • iOS Development Code Camp (Live)
      • HTML5 & Advanced Client Side Development (Live)
      • Actionscript for Beginners (Live)
  • Forum
  • Testimonials
  • Contact Us
    • Actionscript
    • Android
    • C/C++/Objective C
    • HTML/CSS
    • iOS
    • Java
    • Javascript
    • PHP
Home > C/C++/Objective C > Learn C++ On the Mac: Hello World

Learn C++ On the Mac: Hello World

Posted by Mark Lassoff on August 18th, 2011 | 3 Comments

C++ is one of the most common, and most important languages in use. For applications where speed is critical, C++ is often the best option. Since it is compiled in to machine language — unlike Java and .net languages which are interpreted — it runs extremely fast. C++ is often the top choice for creating video games and other graphic intensive applications.

In this first tutorial from the Learn C++ on the Mac series, Mark will review the basics of creating C++ applications on the Mac using XCode.

main.cpp:

#include <iostream>
 
 
//First program in C++ for Mac course
int main()
/*
	Main written by Mark Lassoff
	LearnToProgram.tv
*/
{
	std::cout << "Hello world from LearnToProgram.tv"<<std::endl;
	std::cout << "I am glad you are learning C++";
	return 0;
}

3 Responses

  1. Siwler says:
    August 21, 2011 at 5:13 pm

    I can’t compile or run my project on window vista.
    these are the errors; Source file not compiled. Even after I do compile file I get the same message. Then I tried opening the saved file from its saved location it gives me this error; Following C++ Include directories don’t exist; lib\gcc\mingw32\3.4.2\includ

    Reply
    • Siwler says:
      August 21, 2011 at 7:44 pm

      I figured it out. On windows vista you have to save it under .cpp then only then I was able to compile and run.

      Spread the word.

      Reply
  2. David says:
    October 17, 2011 at 10:08 am

    Even after I save it under .cpp extension, it still is giving me the same error, i.e. “Source File not compiled”.
    I use Windows 7 and Dev-C++.

    Reply

Leave a Reply

Click here to cancel reply.

Join our mailing list

Free video tutorials, course information and more!

* required

Email Address *

First Name

Last Name:

Email Marketing Software by VerticalResponse
Apple Store Facebook Google+ LinkedIn RSS Feed Twitter YouTube
Provided by The Social Links

Like Us!

Live Online Course

Online event registration powered by Eventbrite

Self Paced Course

What is ?

We train software, web and mobile developers. Our classes geared to the way adults learn are available online, or in-person at your office or training center.

New Android Book

Android Programming Code Camp by Mark Lassoff. Coming in 2012. Finally, a true beginners book on Android programming and development. No Experience required.

Email me when the book is available

On Learning

  • Top Languages Used in Web Development
  • How To Learn a Programming Language: 5 Tips
©LearnToProgram.tv 2012 .All rights reserved.