Search:

Type: Posts; User: PaulStat

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    2,705

    Yay it works

    Yay it works
  2. Replies
    5
    Views
    2,705

    Ok let me try and explain this a bit better. I'm...

    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...
  3. Replies
    5
    Views
    2,705

    Random number generator

    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...
  4. Replies
    11
    Views
    1,991

    So does this now look like better C code? Thanks...

    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);
  5. Replies
    11
    Views
    1,991

    Ok slowly but surely :p. Here's what i've got now...

    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);
  6. Replies
    11
    Views
    1,991

    Called like the second one. Sorry i'm not sure...

    Called like the second one.

    Sorry i'm not sure what you're saying here. Is the seed not used for rand?
  7. Replies
    11
    Views
    1,991

    Well the string maxR get's passed in from an...

    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...
  8. Replies
    11
    Views
    1,991

    C Warning message

    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 =...
  9. Replies
    4
    Views
    1,385

    pointer arrays

    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*...
  10. Replies
    5
    Views
    1,960

    Cheers bud, think In was being dumb anyway, why...

    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...
  11. Replies
    5
    Views
    1,960

    Breaking a for loops when result reached

    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...
  12. Replies
    0
    Views
    6,970

    Byte array to IntPtr : Safely

    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...
Results 1 to 12 of 12