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

Managed C++/CLI

 
GeneralRe: Mixing C++ and C Pin
ian mariano24-Mar-04 2:01
ian mariano24-Mar-04 2:01 
GeneralRe: Mixing C++ and C Pin
Member 62566625-Mar-04 5:15
Member 62566625-Mar-04 5:15 
GeneralRe: Mixing C++ and C Pin
ian mariano25-Mar-04 9:59
ian mariano25-Mar-04 9:59 
GeneralRe: Mixing C++ and C Pin
Member 62566625-Mar-04 10:22
Member 62566625-Mar-04 10:22 
Generalfind current path (C++ DLL called from C# file) Pin
jazzle23-Mar-04 6:02
jazzle23-Mar-04 6:02 
GeneralRe: find current path (C++ DLL called from C# file) Pin
ian mariano23-Mar-04 10:24
ian mariano23-Mar-04 10:24 
GeneralRe: find current path (C++ DLL called from C# file) Pin
jazzle24-Mar-04 4:48
jazzle24-Mar-04 4:48 
Generalnewbie timer question Pin
zena9923-Mar-04 4:20
zena9923-Mar-04 4:20 
I need to implement a timer, so I copied the example from the help screen, and pasted it into a new .net console application. When I try to build it I get the following error message:

.....\mytimer.cpp(22): error C2061: syntax error : identifier 'ElapsedEventArgs'

What am I missing???

// This is the main project file for VC++ application project
// generated using an Application Wizard.

#include "stdafx.h"

#using <mscorlib.dll>

using namespace System;

// the following is from sdk help

__gc class Timer1
{
public:
static void Main() {
System::Timers::Timer* aTimer = new System::Timers::Timer;
aTimer->Elapsed += new ElapsedEventHandler(0, Timer1::OnTimedEvent);
// Set the Interval to 5 seconds.
aTimer->Interval=5000;
aTimer->Enabled=true;
}
private:
// Specify what you want to happen when the Elapsed event is raised.
static void OnTimedEvent(Object* source, ElapsedEventArgs* e)
{
Console::WriteLine(S"Hello World!");

// aTimer->Enabled=true;


}
};


int _tmain()
{
Timer1::Main();

Console::WriteLine(S"Press \'q\' to quit the sample.");
while(Console::Read()!='q');

return 0;
}
GeneralRe: newbie timer question Pin
zena9923-Mar-04 4:55
zena9923-Mar-04 4:55 
GeneralI need books pls Pin
extremeg21-Mar-04 20:35
extremeg21-Mar-04 20:35 
GeneralRe: I need books pls Pin
ravjak25-Mar-04 7:03
ravjak25-Mar-04 7:03 
General&quot;blinking&quot; word Pin
millienium bear21-Mar-04 0:07
millienium bear21-Mar-04 0:07 
GeneralRe: &quot;blinking&quot; word Pin
ian mariano21-Mar-04 10:47
ian mariano21-Mar-04 10:47 
GeneralRe: &quot;blinking&quot; word Pin
millienium bear22-Mar-04 1:47
millienium bear22-Mar-04 1:47 
GeneralRe: &quot;blinking&quot; word Pin
ian mariano23-Mar-04 9:50
ian mariano23-Mar-04 9:50 
GeneralReturning array references Pin
bisquic19-Mar-04 5:58
bisquic19-Mar-04 5:58 
GeneralRe: Returning array references Pin
bisquic22-Mar-04 10:01
bisquic22-Mar-04 10:01 
GeneralRe: Returning array references Pin
Andy Wieberneit30-Mar-04 10:59
Andy Wieberneit30-Mar-04 10:59 
Generalconverting managed C++ to native/unmanaged code Pin
Anonymous19-Mar-04 4:47
Anonymous19-Mar-04 4:47 
GeneralNewbie question Pin
almc18-Mar-04 3:18
almc18-Mar-04 3:18 
GeneralRe: Newbie question Pin
ian mariano18-Mar-04 4:28
ian mariano18-Mar-04 4:28 
GeneralRe: Newbie question Pin
almc18-Mar-04 23:04
almc18-Mar-04 23:04 
GeneralRe: Newbie question Pin
ian mariano19-Mar-04 3:24
ian mariano19-Mar-04 3:24 
GeneralEnhansment to LCE System Pin
Buddhike de Silva16-Mar-04 16:19
Buddhike de Silva16-Mar-04 16:19 
Generalc++ Pin
shriganesh11-Mar-04 3:52
shriganesh11-Mar-04 3:52 

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.