Click here to Skip to main content
15,900,378 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: hotmail account Pin
TAREQ F ABUZUHRI14-Apr-06 2:28
TAREQ F ABUZUHRI14-Apr-06 2:28 
JokeRe: hotmail account Pin
toxcct14-Apr-06 2:29
toxcct14-Apr-06 2:29 
GeneralRe: hotmail account Pin
TAREQ F ABUZUHRI14-Apr-06 2:38
TAREQ F ABUZUHRI14-Apr-06 2:38 
GeneralRe: hotmail account Pin
toxcct14-Apr-06 3:30
toxcct14-Apr-06 3:30 
AnswerRe: hotmail account Pin
Don Miguel14-Apr-06 3:35
Don Miguel14-Apr-06 3:35 
GeneralRe: hotmail account Pin
Prakash Nadar17-Apr-06 5:12
Prakash Nadar17-Apr-06 5:12 
GeneralRe: hotmail account Pin
Don Miguel17-Apr-06 5:54
Don Miguel17-Apr-06 5:54 
Questioninclude files Pin
uriblum14-Apr-06 1:20
uriblum14-Apr-06 1:20 
Hello , I copied a sample from msdn, but the compailer doesn't understend most of the language wordes ,The sample itself not importent for now,Only the compailer problem.
the semple is:

using namespace System;
int main()
{
array^args = Environment::GetCommandLineArgs();
const double tipRate = 0.18;
double billTotal;
if ( args->Length != 2 )
{
Console::WriteLine( "usage: TIPCALC total" );
return 1;
}
else
{
try
{
billTotal = Double::Parse( args[ 1 ] );
}
catch ( FormatException^ )
{
Console::WriteLine( "usage: TIPCALC total" );
return 1;
}

double tip = billTotal * tipRate;
Console::WriteLine();
Console::WriteLine( "Bill total:\t{0,8:c}", billTotal );
Console::WriteLine( "Tip total/rate:\t{0,8:c} ({1:p1})", tip, tipRate );
Console::WriteLine( ((String^)"")->PadRight( 24, '-' ) );
Console::WriteLine( "Grand total:\t{0,8:c}", billTotal + tip );
return 0;
}
}
/////////////////////////////////////////////////////
and I get this answer from compiler:
/////////////////////////////////////////////
------ Build started: Project: testing_from_books, Configuration: Debug Win32 ------
Compiling...
general_uri.cpp
.\general_uri.cpp(2) : error C2871: 'System' : a namespace with this name does not exist
.\general_uri.cpp(5) : error C2065: 'array' : undeclared identifier
.\general_uri.cpp(5) : error C2065: 'String' : undeclared identifier
.\general_uri.cpp(5) : error C2059: syntax error : '>'
.\general_uri.cpp(5) : error C2653: 'Environment' : is not a class or namespace name
.\general_uri.cpp(8) : error C2065: 'args' : undeclared identifier
.\general_uri.cpp(8) : error C2227: left of '->Length' must point to class/struct/union/generic type
type is ''unknown-type''
.\general_uri.cpp(10) : error C2653: 'Console' : is not a class or namespace name
.\general_uri.cpp(10) : error C3861: 'WriteLine': identifier not found
.\general_uri.cpp(17) : error C2653: 'Double' : is not a class or namespace name
.\general_uri.cpp(17) : error C3861: 'Parse': identifier not found
.\general_uri.cpp(19) : error C2061: syntax error : identifier 'FormatException'
.\general_uri.cpp(19) : error C2310: catch handlers must specify one type
.\general_uri.cpp(21) : error C2653: 'Console' : is not a class or namespace name
.\general_uri.cpp(21) : error C3861: 'WriteLine': identifier not found
.\general_uri.cpp(25) : error C2317: 'try' block starting on line '16' has no catch handlers
.\general_uri.cpp(26) : error C2653: 'Console' : is not a class or namespace name
.\general_uri.cpp(26) : error C3861: 'WriteLine': identifier not found
.\general_uri.cpp(27) : error C2653: 'Console' : is not a class or namespace name
.\general_uri.cpp(27) : error C3861: 'WriteLine': identifier not found
.\general_uri.cpp(28) : error C2653: 'Console' : is not a class or namespace name
.\general_uri.cpp(28) : error C3861: 'WriteLine': identifier not found
.\general_uri.cpp(29) : error C2653: 'Console' : is not a class or namespace name
.\general_uri.cpp(29) : error C2059: syntax error : ')'
.\general_uri.cpp(30) : error C2653: 'Console' : is not a class or namespace name
.\general_uri.cpp(29) : error C3861: 'WriteLine': identifier not found
.\general_uri.cpp(30) : error C3861: 'WriteLine': identifier not found
Build log was saved at "file://f:\Documents and Settings\uri\My Documents\אורי\חומר ופרויקטים ב-C++\Visual Studio 2005\Projects\testing_from_books\testing_from_books\Debug\BuildLog.htm"
testing_from_books - 27 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
//////////////////////////////////////////////////////////////
Why

QuestionRe: include files Pin
toxcct14-Apr-06 2:26
toxcct14-Apr-06 2:26 
AnswerRe: include files Pin
Michael Dunn14-Apr-06 8:00
sitebuilderMichael Dunn14-Apr-06 8:00 
GeneralRe: include files Pin
2bee 14-Apr-06 9:01
2bee 14-Apr-06 9:01 
GeneralRe: include files Pin
uriblum14-Apr-06 10:43
uriblum14-Apr-06 10:43 
QuestionWinINet.DLL Pin
WebMaster11-Apr-06 18:27
WebMaster11-Apr-06 18:27 
AnswerRe: WinINet.DLL Pin
Michael Dunn11-Apr-06 21:44
sitebuilderMichael Dunn11-Apr-06 21:44 
GeneralRe: WinINet.DLL Pin
WebMaster12-Apr-06 10:03
WebMaster12-Apr-06 10:03 
QuestionWindows Shutdown Pin
DJ Domino11-Apr-06 12:28
DJ Domino11-Apr-06 12:28 
AnswerRe: Windows Shutdown Pin
2bee 12-Apr-06 6:46
2bee 12-Apr-06 6:46 
GeneralRe: Windows Shutdown Pin
Droze15-Jun-06 4:16
Droze15-Jun-06 4:16 
QuestionATL project to C++/CLI: loader lock problem Pin
Judah Gabriel Himango10-Apr-06 18:10
sponsorJudah Gabriel Himango10-Apr-06 18:10 
AnswerRe: ATL project to C++/CLI: loader lock problem Pin
George L. Jackson11-Apr-06 10:49
George L. Jackson11-Apr-06 10:49 
QuestionHow to Debug a Windows Service Pin
sunil440010-Apr-06 4:25
sunil440010-Apr-06 4:25 
QuestionFile transfer: Client-Server Communication Pin
Kranti12519849-Apr-06 19:46
Kranti12519849-Apr-06 19:46 
Questionstd::string within .NET 2003 Pin
richiebaby9-Apr-06 13:40
richiebaby9-Apr-06 13:40 
AnswerRe: std::string within .NET 2003 Pin
PJ Arends9-Apr-06 15:52
professionalPJ Arends9-Apr-06 15:52 
AnswerRe: std::string within .NET 2003 Pin
Michael Dunn9-Apr-06 18:56
sitebuilderMichael Dunn9-Apr-06 18:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.