C++ Logo

std-proposals

Advanced search

Re: [std-proposals] D3803R0 More standard forms of main

From: Thiago Macieira <thiago_at_[hidden]>
Date: Wed, 23 Jul 2025 19:39:36 -0700
On Wednesday, 23 July 2025 16:54:20 Pacific Daylight Time Yexuan Xiao via Std-
Proposals wrote:
> Although in K&R (the book), the main function does not have a return value

That applies to every function, not just main(). Additionally, arguments are
also implicitly int.

foo(p, q)
{
    return q + p;
}

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel Platform & System Engineering

Received on 2025-07-24 02:39:43