|
Since tmath.h , complex.h , and cmatrix.h are included multiples times, do you have safeguards in place to prevent multiple inclusions? Check out the #pragma once directive.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
1hr 23mins ago
1hr 22mins ago
|
|
|
|
|
Another solution could be to make a new header file (i.e. Headers.h) or use the stdafx.h if you have it, to put all the #includes there.
By the way... #pragma once is the best option
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Hi
I need the source code of naive bayes classifier in C++ and I want to run it in VC++ in windows. Please help me.
thanks in advance
|
|
|
|
|
|
Read the post at the top of the forum titled "How to get an answer to your question". Pay attention to #2
|
|
|
|
|
i have a computer that used by several people and i don't want anybody else to change the date and time of the computer, how can i do this through VC++?
thx.
|
|
|
|
|
I dont know, but I can imagine it with a hook, detecting when the Dialog to change date and time of the computer is being called and closing it.
Or saving the actual date and time in this moment and starting a time count somewhere. When that dialog is closed, asking for a password to save the changes, if password correct save changes, if not... restore the previously saved values + time offset.
It is just an idea that came when i read you. Most probably there are much better ways to do it.
Let us see what the masters say.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Make a User account for each person and restrict their privileges.
This is not a C++ answer, was it a C++ question? If not you are in the wrong forum
|
|
|
|
|
hi all,
we are planning to change the look and feel of out product which is developed MFC classes with the help of our own classes as wrapers to MFC control classes to made the control look like flat control..
but on client requests we need to make controls look even more ritch like XP control.. with minimal changes
for that iwas looking at comancontrol6.0.. but comancontrol6.0 works only on windows XP.. but our product is well established on win2k server
please some one help me in finding out what the best solution for my problem mentioned abow
and also let me know how abt GDI+ , please let me know wether GDI+ works on win2k r no
am eagerly waiting for the suggessions from u
i hope u all will help me finding out the best solution for me
thank you
|
|
|
|
|
Well first of all GDI+ is part of the .Net framework 2.0. And indeed it works on Win2K, although since you cannot use XP's visual styles you will not be able to use them.
There is nothing stopping you from creating your own controls derived from the .Net controls and change their draw methods.
Dewm Solo - Managed C++ Developer
|
|
|
|
|
sarat12in wrote: please let me know wether GDI+ works on win2k r no
They hide that information in the documentation[^]
|
|
|
|
|
|
The size of your message pieces depends on your communication medium. You need to experiment and find the balance between transmission time and the overhead to prepare a message segment. Also, you'll need to implement some kind of handshake to handle corrupt message pieces.
If you're that concerned about corruption, do some investigating about Error Correcting Codes.
Judy
|
|
|
|
|
What protocol are you using?
If it's TCP, you don't need to worry about CRC.
You probably won't be able to send that much data in one
send() call though
Are you encrypting the data or just worried about successful delivery?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
Russell' wrote: I'm using socket with TCP protocol.
I don't need to encript the data, my only problem is the success of this trasmission.
Why worry about this then?
Yes, the TCP protocol will split your data into "frames". The network may further split those
frames. The protocol will also check for successful transmission, resend when necessary, etc. until all
data sent transmits successfully.
I'm not sure what you hope to gain by splitting into smaller units yourself.
I would let TCP do its thing. It's a very reliable protocol.
As for the send() function (and recv() as well), how much you can do at one time
depends on the socket's buffer size and how much room is left in that buffer.
Nothing changes at the application layer of the protocol stack however - you should always be
calling send() and recv() enough times until all data is sent or received.
When sending, for example (receiving is very similar)...
char *pNextByteToSend = ;
int nBytesToSend = ;
while (nBytesToSend > 0)
{
int nBytesSent = ::send(socket, pNextByteToSend, nBytesToSend, 0);
if (SOCKET_ERROR == nBytesSent)
{
int sockerr = ::WSAGetLastError();
if (sockerr != WSAEWOULDBLOCK)
{
break;
}
}
pNextByteToSend += nBytesSent;
nBytesToSend -= nBytesSent;
}
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
And yes you could use MD5 to check the integrity of the entire data sent.
That would be part of the application layer (your code) of your protocol,
not TCP
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
http://www.quasarelectronics.com/3165.htm[^]
Hey there,
Im relativly new to c++ and looking for a little advice,im interested in buying a PC Controlled Relay Board (Link above) that comes with its on software,however the website in question state's that it is possible to write your own software for the relayboard using a DLL from http://www.logix4u.cjb.net[^]now i have no experience in parralel port coding and was wondering how much of a mammoth task this would be.
Here is my concern - As you can see the board has 8 relays that can be independently controlled with software via the parralel port, Well how do i find the On/Off commands that will have to be called from my DLL and sent to the relay board to control each individual relay on the board?
Any advice would be greatly appriciated.
Thankyou for your time.
Chris
|
|
|
|
|
I don't have experience with that board you have listed but a while back I wrote a C program that controled 36 relays. In that case it was simple calls to functions supplied in the manufacturers' DLL. Basically I sent their function a bit pattern of the relay's I wanted on or off.
On initializing the app, you would set up the interface between the functions and the port / hardware. Just hope that their DLL si writen well.
I would have to go look in my files, but I seem to remember it was Houston Instruments or something. Not Texas Instruments.
In any case. the controling of the board from my code was the easiest part of the app.
-- modified at 10:52 Tuesday 30th October, 2007
I checked, it was National Intruments: http://www.ni.com
|
|
|
|
|
hi,
i'm using a flex grid in my project.
i don't know how to get the no of rows in the MS flexgrid
thanks
panthal
|
|
|
|
|
yourgridvariable.GetRows();
will do for you.
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
thank u very much chandu,
i searched this function in more sites,
but i didn't get,
thank u
panthal
|
|
|
|
|
Hi,
We are using webbrowser control within our MFC desktop application to navigate different web applications. Some of these applications having session based cookies which are valid until the browser is closed , if acessing from iexplorer.
But our desktop application having it's own session management logic, each time it logs-out and login it creates a new instance of browser control. And what we found was even though the browser object is being released every time, session cookies remains valid until we exit the desktop application.
We found that the WinInet API having some API for cookie management , but we could'nt find any direct API call to delete session cookies of a process.
Can somebody please give us answers for following questions,
1. How can we filter the session cookies from InternetGetCookies() function?
2. Is there any API we can use to delete session cookies?
Thanks,
Janaka
|
|
|
|