|
If you create a new Array, of 100 tank objects, you have an array with 100 instances of null. You need it iterate over the array, and say
myArray[x] = new gcnew tank();
to create the actual objects in the array.
where x is the index into the array ( you'd probably do this in a loop )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: myArray[x] = new gcnew tank();
Typo.
|
|
|
|
|
Hi all,
I have an application in vc6,in that i am using XP style.
The way I am giving XP Style to my application is by adding an XML File
to my resource . The content of the Xml file is given below
/******************************************************************************/
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
="" manifestversion="1.0">
<assemblyidentity
version="1.0.0.0"
="" processorarchitecture="X86" name="Microsoft.Windows.YourApplication" type="win32">
<description>LitmusPro
<dependency>
<dependentassembly>
<assemblyidentity
type="win32"
="" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorarchitecture="X86" publickeytoken="6595b64144ccf1df" language="*">
/****************************************************************************/
It is working fine in VC6 .
But, when I compile my application in Visual Studio 2005 , this is not working . How can I make it work.
Please Help me
Thanks
Vinod
|
|
|
|
|
Remove the .manifest file from your resources (along with its reference in the .rc file). Then, go to Project Properties / Configuration Properties / Linker / Manifest File, and set Generate Manifest to Yes. Don't forget to call InitCommonControls in your InitInstance function.
This is not a C++/CLI question though, so you're in a wrong forum. Use Visual C++ / MFC[^] forum to discuss non-.NET C++ issues.
|
|
|
|
|
hey folks
I just found this old remote control from Pinnacle Systems and wanted to code an application (in C++/CLI) which uses the RC, means: respond to key presses on the RC (volume up/down etc).
It has an infrared receiver (no extra power or so is needed), which I connected to my serial port (luckily I got one on my new computer!).
The question is, how can I receive messages?
I already opened the port (COM1), but no messages were received
Is there any driver-stuff I need or something?
any C++/CLI code is appreciated!
thx in advance
|
|
|
|
|
I had written a program and I need use Random class, so I wrote :
Random^ i = gcnew Random();<br />
for(int i=0; i<10; i++) {<br />
em[i]->pct->Left = i->Next(min_x, max_x);<br />
em[i]->pct->Top = i->Next(min_y, max_y);<br />
}
em is static array< tank^ >^ em;
and tank is :
ref struct tank {<br />
int step_x, step_y; <br />
System::Windows::Forms::PictureBox^ pct;<br />
};
but I get an error : error C2227: left of '->Next' must point to class/struct/union/generic type type is 'int'
Where is problem??
|
|
|
|
|
thesad wrote: em[i]->pct->Left = i->Next(min_x, max_x);
i needs to be a number, an index into the array. Instead, it's an instance of the Random class.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
thanks for your help
|
|
|
|
|
Hi all,
Could someone please give me a short insight or web reference on the following: how to get notified when a new email message has arrived (MS Outlook) using VC++.
Many thanx in advance.
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Shouldn't this qualify for cross post and wrong forum ?
|
|
|
|
|
Not sure .. what do you think?
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Yesterday, you have asked same question in VC++ forum, which is right forum for this question. Did you say CLI or managed C++ some where ?
|
|
|
|
|
Programm3r wrote: insight or web reference on the following: how to get notified when a new email message has arrived (MS Outlook) using VC++.
you have to look MSoutlook com interface for that... try googling
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
Can sombody help, i need source for capturing s-video from my pinnacle pci card to borland c++. Or can sombody tell me where to begin if i write it myself. Because i dont know how link other applications ed.
bozzim
|
|
|
|
|
Borland doesn't do C++/CLI AFAIK, so odds are, you're in the wrong forum. Try the visual C++ forum, but even then, Borland means you're pushing it to find someone here who can help.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
Does anyone know the function to get the Length of a file in CPP (Win32 Console Application).
Regards,
Vichitra
|
|
|
|
|
I know that you've described a program that is not appropriate to this forum. Try the visual c++ forum.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
GetFileSize()? Or for "Really Big®" files (according to the docs), GetFileSizeEx()?
Great job, team. Head back to base for debriefing and cocktails.
|
|
|
|
|
Hi all.
I have some problem, I need class thet manage files as CFile in MFC, but in console.
can anyone help me.
Thanks for any help.
|
|
|
|
|
Wrong forum. Ask here[^].
|
|
|
|
|
I used your codes and creating resume format in paragh form.But in some feilds value is replaced along with the mergefield and field name.KInndly suggest a solution
Regards,
Lea
Lea
|
|
|
|
|
Is there a C++/CLI article on CP on using Word ?
Anyhow, the article has a forum attached to it, if you want to ask the author a question.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi all,
I m new for C++, May u reffer me some good tutorials
Thanks & Regards
Pankaj Jain
|
|
|
|
|
I suggest you learn C++ before worrying about C++/CLI. The web is full of tutorials, but you'd do better to buy a good book and work through it first.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I'm trying to compile the below code with the command line compiler but I get a bunch of errors? Errors like 'System' is not a class or namespace name. I'm using cl.exe and the command "C:\cl test.cpp".
Can the command line compiler be used on this type of code?
#include
#include
using namespace System::IO;
using namespace System::Text::RegularExpressions;
void main (void)
{
int index = 0;
String ^line;
Regex^ rx = gcnew Regex(",")
StreamReader^ sr = gcnew StreamReader(testfile.tif);
while ( line = sr->ReadLine() )
{
array^ ia = rx->Split(line);
}
int a=array[index++];
int b=array[index++];
int c=array[index++];
if (a <= 42)
{
b--;
if (c > 1444)
c--;
}
else if (a > 42)
{
do {
a += b;
}
while (b <= 1000);
}
return;
}
|
|
|
|