|
Why is the C++/CLI stuff a disaster? I'm not arguing, I just want to know because I may have to make use of it...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I personally find it works well. It's the most useful (to me) thing
that's been added to Visual C++, well, ever.
The Managed Extensions were kind of a "disaster" with
confusing syntax and lack of some useful keywords, but
the new C++ syntax is pretty nice to use.
I guess for C# programmers, all of C++ is a disaster
(;P Christian)
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
I'm using Microsoft Visual C++ 6.0.
I have the following codes in my program:
int x;<br />
cout<<"Enter a number: ";<br />
cin>>x;<br />
double Num[x];
The following errors are occured:
1. error C2057: expected constant expression
2. error C2466: cannot allocate an array of constant size 0
3. error C2133: 'Num' : unknown size
How to solve my problem?
Please do not tell me to enter something like "int x=100" or "int Num[100]". I want to the user of my program set the size of the array.
Any reply will be appreciated.
|
|
|
|
|
cshong wrote: I'm using Microsoft Visual C++ 6.0.
Then you must be in the wrong forum ( VC7 was the first to support managed C++ ). Try the visual c++ forum.
The answer is that you need to dynamically allocate via a pointer if you don't know the array size at compile time. But, next time, this is the wrong forum.
Christian Graus - Microsoft MVP - C++
"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 the reply. Any administrator please move this thread to the right forum please.
|
|
|
|
|
I need the c++ program wich can calculate the centroid of the curve with the Reaiman Sum.
|
|
|
|
|
Using managed C++?
If not, please post your question on the Visual C++/MFC[^] board.
Have this info? Riemann Sum[^]
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
hi, guys.
im developing a software for my personal use in C++.
i want program to start as windows service, when windows starts it should start too.
- i need create a key (string) in registry.
- i need to make it firewall enable.
HKLM/Software/Microsoft/Windows/Current Version/run/myprogram.exe
can you provide me a peace of code so i can construct my program.
anyone who help me thanks so much.
so much of happy ending...
|
|
|
|
|
Try searching this site for articles about services and accessing
the registry....I bet there's lots of them
Reference material:
Services[^]
Registry[^]
Since you've posted on the managed C++ board, I'll assume you're
using managed C++. In that case, there's an appwizard in visual studio
that will create a managed service application for you.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks mark for helping.
i was hoping get a sample or code of what i have mentioned here.
yeah thats right there are lot of sites saying so.
thanks mark
so much of happy ending...
|
|
|
|
|
zafax4 wrote: yeah thats right there are lot of sites saying so.
I'm not sure what you mean by that...
Anyway, type "windows service" into the search box at the top of this page.
When you get the list of hits, you can refine your search to just C++-related articles.
I just tried it....there was many articles on creating Windows Services there.
Most articles have source code you can download.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks mark,
zafax4 wrote:
//yeah thats right there are lot of sites saying so.
it means there are lot of websites about win services and registry files concepts, im currently searching for them.
i hope you understand my words now.
i wonder what i am doing here
thanks.
so much of happy ending...
|
|
|
|
|
zafax4 wrote: i wonder what i am doing here
ROTFLMAO I'm laughing tears
|
|
|
|
|
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
How can I prevent a class from being inherited?
My idea is to declare the constructor of the base class to be prviate. Is it correct?
For example
class A
{
private:
A() {};
public:
~A() {};
}
class B : public A
{
public:
B() {};
~B() {};
}
int main()
{
B b;
return 0;
}
As I compile the program, error C2248 happen. Is it all right?
Is there any good idea of preventing a class from being inherited?
many thanks.
|
|
|
|
|
Have a look at sealed keyword.
|
|
|
|
|
Excuse me, I can't find any subjects I want in your articles.
Can you give me a link to it or say in more details?
thanks.
|
|
|
|
|
I didn't mean my articles, it's just my signature. Just look up sealed keyword.
|
|
|
|
|
oh, I see. I have found the topic through keyword research.
Thank you very much indeed.
|
|
|
|
|
You are welcome
|
|
|
|
|
Hi, I'm using Visual Studio 2005 C++/CLI and I wanted to bring up a properties page when an object/control is right-clicked on. It seems that I can have all kinds of general mouse events but how do I determine if the left button was clicked (pressed down, let up, etc.) or the right button was clicked? And what about three button mice and mice with thumb-wheels?
Thanks
Buck
|
|
|
|
|
Handle the MouseDown event and check the Button property of MouseEventArgs parameter that is received by the eventhandler
|
|
|
|
|
Thanks, works great, lasts a long time.
Buck
|
|
|
|
|
how do i make an icon for my c++ program?
iam using borland turbo c++5.01 version on windows xp.
|
|
|
|