Comment

Comment by Ives

The example on the bottom can hardly be called C++

  #include "stdio.h"
  
  void main()
  {
  	printf( "Hello world!\n" );
  	getchar();
  }
- main() should return int, not void

- std::cout should be used instead of printf

- std::cin should be used instead of getchar()

parent Ives 15 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton