Uhm, trying searching for "disappears" in the FAQ....
Type: Posts; User: mingerso
Uhm, trying searching for "disappears" in the FAQ....
I prefer postgresql but have never used it in a Windows environment. They also have pretty good documentation - check out http://www.postgresql.org/docs/8.3/interactive/ecpg.html and...
You have quite a few issues here and should take the code that was posted earlier as an example to encrypt strings. You don't just pass the whole string but have to do multiple passes to...
As I linked to before, you need to download the code from here: http://www.schneier.com/code/bfsh-koc.zip
and you need to use the blowfish.c code when compiling.
You could always use another...
You would probably want to make some wrapper functions for encrypting and decrypting, but to change the password you have to use this:
Blowfish_Init (&ctx, (unsigned char*)"TESTKEY", 7);
Heres an example that would work on strings:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "blowfish.h"
int main(int argc, char * argv[])
Look at the C example http://www.schneier.com/code/bfsh-koc.zip
Yes, errors aplenty.
Anyways, this little tangent on this thread about casting could be summed up as:
1. If invoking a C++ compiler on C code you should cast mallocs.
2. If invoking a C...
Sorry, I'm an idiot and typed:
extern C {
}
Forgot the quotes.
I tried a couple of tests on Linux with gcc but could not figure out how to do this. You wouldn't happen to know the options to pass to gcc?
As far as I have seen using gcc, you cannot do...
I guess I was not very clear. I was saying that he was saying compile as C code like:
gcc -c test.c -o test.o
and then follow with a C++ compiler:
g++ test.o test2.cpp
I think this would be a common scenario where someone would combine C into C++: http://www.libsdl.org/
And combining code compiled with a C compiler with a C++ compiler... can you do that? Or am I...
Or call fflush().
This works on many platforms and was easy to use the few times I have:
http://www.libsdl.org/
Also, I think the argument of casting comes from a while back when it was needed (before ANSI/ISO). You would want to cast if you had changed your datatype from say: "double * d" to "struct s * d"...
Here's a corrected version with some error checking:
#include <stdio.h>
#include <assert.h>
int main(int argc, char ** argv)
{
int i;
int array[20];
Yes all very good points of preference... and back to what was being said:
"... so do something... or not"
That is the typical method but depends on what you're doing. It is not required and I see your point, but if you're going to be using pointer allocations this way you might want to make a wrapper...
This was mentioned earlier but heres an example of realloc and not destroying your previous pointer ( so you can avoid bad free()'s and memory leaks ):
char * add_space(char ** str)
{
int...
The main problem you will probably run into is having multiple objects that use the header with the function and linking all of the objects into the main executable. You basically are trying to...
Multiple ways but look at these before attempting:
1. http://linux.die.net/man/2/open
2. http://linux.die.net/man/2/flock
3. http://linux.die.net/man/2/fcntl (more complicated)
Some simplified...
This may be what you are looking for:
http://www.enderunix.org/docs/en/rawipspoof/
When using the ip and icmp headers you can define them yourself or they may differ from the example unless you...
Typically you would just have a prototype for the function in the header.
See:
http://en.wikipedia.org/wiki/Header_file
and...
This might help you without using ncurses (only tested on linux).
#include <stdio.h>
#include <stdarg.h>
void print_pos(int x, int y, char * msg, ...)
{
/* sets the cursor */
...
Here's a simple C example, should work just fine but not really tested.
#include <stdio.h>
/* You had this set to 20 but I believe
* you only had 18 answers actually set
*/
#define...