Coffeehouse Post

Single Post Permalink

View Thread: A quick self-reminder why I did not pursue native development
  • User profile image

    @androidi: using win32 console app project in VS2010:


    #include "stdafx.h"
    #include <iostream>
    #include <string>
    using namespace std;
    int _tmain(int argc, _TCHAR* argv[])
        string entry = "";
        cout << "Please enter your name.";
        cin >> entry;
        cout << "Hello, " << entry;
        return 0;

    I haven't coded in C++ for probably 6-7 years. Not too different from the C#:

    using System;
    namespace TestingCSharp
        class Program
            static void Main(string[] args)
                Console.Write("Please enter your name:");
                string name = Console.ReadLine();
                Console.WriteLine("Hello, " + name);


    edit - oh wait, you wanted C and not C++? For a quick and dirty app, just use printf() and scanf().