Yay it works
Type: Posts; User: PaulStat
Yay it works
Ok let me try and explain this a bit better. I'm using a piece of software which will take a C header file and an obj file, import these as extra functionality and then it can call the functions...
Ok I seem to have a further problem, with the rand function. It produces the same set of random numbers in the same order every time it get's called. Now if I use the srand(time(NULL)) to create a...
So does this now look like better C code? Thanks for all your help guys
#include <stdlib.h>
char* LB_Random(char *maxR,char *dummy)
{
int i;
static char n[10];
int rMax = atoi(maxR);
Ok slowly but surely :p. Here's what i've got now
#include <stdlib.h>
char LB_Random(char *maxR,char *dummy)
{
int i;
static char n[10];
int rMax = atoi(maxR);
Called like the second one.
Sorry i'm not sure what you're saying here. Is the seed not used for rand?
Well the string maxR get's passed in from an external program, but it will be a number. So that's why I need to convert it back to an integer so that I can use it in my calculations. What would be...
I have the following c function that returns a random number between 0 and maxR.
#include <stdio.h>
char LB_Random(char *maxR,char *dummy)
{
int i;
static char n[10];
int rMax =...
I'm not sure if I'm understanding this properly, i have the following in c++
void test1(byte* dcData,int x,int y)
{
int startrow=0;
int endrow=2;
byte* data = dcData;
byte*...
Cheers bud, think In was being dumb anyway, why the hell would I need a break when return is just the equivalent. Oh i'm not sure but I think I might have spotted an error in your code.
int...
I'm having a mental block at the moment. Basically I have a collection of objects so I'm wanting to loops through the collection until a certain set of values are reached and then return the Index of...
I'm wanting to convert a byte array to a IntPtr and vice versa, now i'm aware that one can use
Marshal.StructToPtr
But this method uses the an unsafe solution i.e. uses the unsafe keyword. I'm...