From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 28 08:39:59 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C49D434 for ; Sat, 28 Dec 2013 08:39:59 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 57CAF1A3E for ; Sat, 28 Dec 2013 08:39:59 +0000 (UTC) Received: from Alfreds-MacBook-Pro-9.local (c-76-21-10-192.hsd1.ca.comcast.net [76.21.10.192]) by elvis.mu.org (Postfix) with ESMTPSA id 29C191A3C1D; Sat, 28 Dec 2013 00:39:56 -0800 (PST) Message-ID: <52BE8E5A.40807@mu.org> Date: Sat, 28 Dec 2013 00:39:54 -0800 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Joe Nosay , FreeBSD Hackers Subject: Re: template example References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 08:39:59 -0000 On 12/27/13 7:41 PM, Joe Nosay wrote: > I need a working example of C and C++ that will run using clang. I have to > go head first into code and I learn by using an example, replacing > variables, and then running. The standard "Hello World!" doesn't seem to > work. What I would like to do is run commands from within the file. > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > #include #include int main(int Argc, char **Argv) { int rv; rv = system("echo hello world"); std::cout << "return status from system call is: " << rv << std::endl; return (rv); } ? -- Alfred Perlstein