Click here to Skip to main content
15,910,277 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Cannot throw my own exception from dll (not exactly true, but please read) Pin
Cedric Moonen14-Apr-06 4:49
Cedric Moonen14-Apr-06 4:49 
GeneralRe: Cannot throw my own exception from dll (not exactly true, but please read) Pin
Cedric Moonen14-Apr-06 4:54
Cedric Moonen14-Apr-06 4:54 
AnswerRe: Cannot throw my own exception from dll (not exactly true, but please read) Pin
Stephen Hewitt14-Apr-06 21:28
Stephen Hewitt14-Apr-06 21:28 
QuestionWhy VC++? Pin
HakunaMatada13-Apr-06 22:36
HakunaMatada13-Apr-06 22:36 
AnswerRe: Why VC++? Pin
toxcct13-Apr-06 22:42
toxcct13-Apr-06 22:42 
GeneralRe: Why VC++? Pin
HakunaMatada13-Apr-06 23:10
HakunaMatada13-Apr-06 23:10 
AnswerRe: Why VC++? Pin
David Crow14-Apr-06 2:50
David Crow14-Apr-06 2:50 
Questioninclude files Pin
uriblum13-Apr-06 22:35
uriblum13-Apr-06 22:35 
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<string^>^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
AnswerRe: include files Pin
toxcct13-Apr-06 22:42
toxcct13-Apr-06 22:42 
QuestionAbout a Ebook "Inside OLE" Pin
tombfifa13-Apr-06 22:20
tombfifa13-Apr-06 22:20 
QuestionWorking with WM_DESTROY Pin
Axonn Echysttas13-Apr-06 22:08
Axonn Echysttas13-Apr-06 22:08 
AnswerRe: Working with WM_DESTROY Pin
Michael Dunn13-Apr-06 22:14
sitebuilderMichael Dunn13-Apr-06 22:14 
GeneralRe: Working with WM_DESTROY Pin
Axonn Echysttas14-Apr-06 0:19
Axonn Echysttas14-Apr-06 0:19 
AnswerRe: Working with WM_DESTROY Pin
Le Thanh Cong13-Apr-06 22:39
Le Thanh Cong13-Apr-06 22:39 
AnswerRe: Working with WM_DESTROY Pin
CodeVarma14-Apr-06 19:18
CodeVarma14-Apr-06 19:18 
QuestionGet username of remote PC Pin
Le Thanh Cong13-Apr-06 22:05
Le Thanh Cong13-Apr-06 22:05 
AnswerRe: Get username of remote PC Pin
Mila02513-Apr-06 23:53
Mila02513-Apr-06 23:53 
GeneralRe: Get username of remote PC Pin
Le Thanh Cong13-Apr-06 23:58
Le Thanh Cong13-Apr-06 23:58 
QuestionCOM like MS.Equation in MS.Word Pin
vtalau13-Apr-06 21:44
vtalau13-Apr-06 21:44 
Questiontab control mfc Pin
brouka13-Apr-06 20:59
brouka13-Apr-06 20:59 
AnswerRe: tab control mfc Pin
Aqueel13-Apr-06 21:04
Aqueel13-Apr-06 21:04 
AnswerRe: tab control mfc Pin
Ștefan-Mihai MOGA13-Apr-06 21:05
professionalȘtefan-Mihai MOGA13-Apr-06 21:05 
AnswerRe: tab control mfc Pin
Hamid_RT13-Apr-06 21:19
Hamid_RT13-Apr-06 21:19 
AnswerRe: tab control mfc Pin
Le Thanh Cong13-Apr-06 22:02
Le Thanh Cong13-Apr-06 22:02 
QuestionMonitoring Registry Pin
kiranin13-Apr-06 19:53
kiranin13-Apr-06 19:53 

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.