|
From: <lho...@ho...> - 2002-04-18 13:03:28
|
I think that is ANSI compatible but the BCB does not support.
try this:
#include <iostream>
#include <cstdlib>
using namespace std;
int main(int argc,char **argv){
const int i=10;
//use a const here.
int arr[i];
system("pause");
return 0;
}
I havn't BCB,but I test it with CL.exe.
>From: "Anon" <an...@pu...>
>To: <dev...@li...>
>Subject: [Dev-C++] Ansi compatible?
>Date: Thu, 18 Apr 2002 11:50:11 +0530
>
>Hey!
>Can anyone please tell me if the following code is ANSI compatible? It
compiles fine with DevC++ but throws up an error in Borland 5.0
>
>#include <iostream.h>
>#include <stdlib.h>
>
>int main()
>{
> int i=10;
> int arr[i]; //can it do accept Integer variable
> system("PAUSE");
> return 0;
>}
>
>My classmates say that this is a violation of ANSI standard.
>
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.346 / Virus Database: 194 - Release Date: 4/10/2002
_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger:
http://messenger.microsoft.com/cn
|