Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,082 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,552 people online right now. Registration is fast and FREE... Join Now!




help with arrays

 
Reply to this topicStart new topic

help with arrays

ISmajor
22 Apr, 2008 - 10:48 AM
Post #1

New D.I.C Head
*

Joined: 7 Mar, 2008
Posts: 4

i have not yet worked on the body of my program because i can not get passed the beginning because of this error:
.\project5.cpp(9) : error C4980: '__gc' : use of this keyword requires /clr:oldSyntax command line option



// project5.cpp : main project file.

#include "stdafx.h"

using namespace System;

int main(array<System::String ^> ^args)
{
int hours __gc[ 10 ];
int charges __gc[ 10 ];

Console::WriteLine( L"Enter the number of hours parked:" );
hours[10] = Int32::Parse( Console::ReadLine() );



Console::WriteLine (L"car number\thours parked\t\amount charge" );
//output values for each array
for (int i = 1; i <= 10; i++ )
Console::WriteLine( L"{0}\t\t{1}\t\t{2}", i. ToString(), hours[ i ].ToString(), charges[ i ].ToString() );


return 0;
}


User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/1/08 07:45PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month