|
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.
|
|
|
|
|
zulfi123786 wrote: using borland turbo c++5.01
By definition, this means you're not using C++/CLI and are in the wrong forum. The Visual C++ forum is the closest we've got to Borland.
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 )
|
|
|
|
|
Just more proof that the forums aren't clearly/appropriately marked
"Visual C++" should be called "Native/Unmanaged C/C++"
and this forum should be called "Managed C++ and C++/CLI"
-- modified at 11:59 Monday 15th October, 2007
And of course I just noticed this forum says "(Managed)" at the top of its name. :/
"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 know this sounds like a stupid question but i can't seem to get a for each loop to compile correctly.
I tried...
for each (IpAddress ^addr in ipAddresses) {
}
and...
IpAddress^ addr = nullptr
for each (addr in ipAddresses) {
}
but none of them compile. I know i could do a for loop but i would rather just do a for each. I searched but i cant seem to find anyone else having this problem. Thanks alot for any help
here are some of the errors:
Error 1 error C2143: syntax error : missing 'in' before '^'
Error 2 error C2065: 'addr' : undeclared identifier
Error 3 error C3192: syntax error : '^' is not a prefix operator (did you mean '*'?)
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
teejayem wrote: here are some of the errors:
And what are the other errors? Sometimes some errors are caused because of the errors that occur before them. I guess these are errors for the first case. Your code should look like this:
<br />
foreach (IpAddress^ addr in ipAddresses)<br />
{<br />
<br />
}
|
|
|
|
|
hey Giorgi thanks for your reply.
these are some of the errors i get.
Error 1 error C2143: syntax error : missing 'in' before '^'
Error 2 error C2065: 'addr' : undeclared identifier
Error 3 error C3192: syntax error : '^' is not a prefix operator (did you mean '*'?)
array<IPAddress^>^ ipAddresses = Dns::GetHostAddresses(Dns::GetHostName());
for each (IpAddress ^addr in ipAddresses) {
}
i don't think it is any other part of the code that is failing because as soon as i comment the for each loop it compiles fine. Thanks,
-- modified at 9:43 Thursday 11th October, 2007
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
array<System::Net::IPAddress^>^ ipAddresses =
System::Net::Dns::GetHostAddresses(System::Net::Dns::GetHostName());
for each(System::Net::IPAddress^ addr in ipAddresses)
System::Console::WriteLine( addr->ToString());
|
|
|
|