sorry for the late reply. I do not get any warnings using round without the -c99 flag. I finally created my own round function. But thanks for the info.
Amish
Type: Posts; User: axr0284
sorry for the late reply. I do not get any warnings using round without the -c99 flag. I finally created my own round function. But thanks for the info.
Amish
I used #include <math.h>
and when i compile I added the flag -lm
I dunno what the c99 thingy is. Can someone explain more. Thanks
Amish
Hi,
I need to round a number. I tried using round from math.h but it's returning weird values
double num1 = 0;
num1 = round(2.67);
printf("col = %f\n", num1);
I am getting...
Sweet that does the trick. Thanks a lot,
Amish
Hi,
I have a weird problem when printing hex values.
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h> /* mmap() is defined in this header */
#include <fcntl.h>
#include...
what you could do is open a new file for writing, write line 1 then copy the data from the other file in. Delete old file (using system function) and rename the new file. I know there is a function...
It does defeat the purpose of a private function if you can access it outside a class. You can use accessor and modifier methods to access them from the outside though
Amish
post some code also
Hi,
I am having some issues with using dll. I have a program that loads home made dll at start up. The problem is that the program loads the dll correctly using loadLibrary() on the computer where...
how about public, protected?? Can I export a constructor of a class for example. How would I use that in the application that calls the dll. Thanks
Amish
Hi,
I was wondering if I can export private function of a class found in a dll. Thanks
Amish
Figured it out. It would seem that ms vs 2005 was not using the def file when linking the dll. Most probably name mangling was occuring. After forcing it to use the def file using...
Hi,
I am trying to call functions from a dll without any success.
This is the dll setup:
#define DllExport __declspec( dllexport )
DllExport int _stdcall setupConnection(void) {
...
}
Ok Figured it out.
I would seem like gethostbyaddr() expects the first parameter to be a binary representation of the Internet address. Therefore the following conversion needs to be used before...
Thanks for the reply. I tried everything that you said and checked that the length passed to the function was correct this time but it still returns NULL. Error returned by WSAGetLastError() is as...
HI,
I have been trying to get sockets to work but for some reason it does not work:
const char *ip_address = "127.0.0.1";
client=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);...
I think it comes from windows.h. Try to include that. Not too sure though
Amish
check msdn:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceseril/html/ceconserialcommunicationfunctions.asp
it has all the functions
Use createFile to get a handle to the...
check that the IDD_ for the two classes is different. Check any similarities between the classes that might confuse the compiler
do this
objectTest = new object[numOfObjects];
instead of this
object* objectTest = new object[numOfObjects];
The problem was that when creating the program in ms vs 2005, the unicode libraries were used instead of regular ones . In that case Cstring would become CstringA.
Hi,
I have just encountered a problem that is confusing. I have used Cstring before in mfc applications and it has never given me any issue but in a new project I am getting this error:
error...
Hi,
I have to separate programs. Usually they would be located on different computers and communicate between themselves using the CSocket class. My question is for testing purposes, can I run the...
You should probably close the dll when you're done. Maybe that's what giving you mem leak.
Amish
you could just add IDD_ABOUT to resource.h followed by a number that is greater that the greatest number currently in resource.h. Make sure there is no two numbers being the same.
The IDD_ snd...