Search:

Type: Posts; User: Godders_2k

Search: Search took 0.00 seconds.

  1. Thread: Strcpy

    by Godders_2k
    Replies
    17
    Views
    6,651

    So there is absolutely no point in me doing the...

    So there is absolutely no point in me doing the malloc in the first place? Is what I should be doing setting it to NULL after I have used it? Or if I did &szPostStart = "For Example" would this force...
  2. Thread: Strcpy

    by Godders_2k
    Replies
    17
    Views
    6,651

    What I have is a fixed size array which is char...

    What I have is a fixed size array which is char szPostStatement[5000] where I have initialised the array to have NULLs for all the locations. I have also declared a char *szPostStart and a char...
  3. Thread: Strcpy

    by Godders_2k
    Replies
    17
    Views
    6,651

    Strcpy

    Hi, I was just wondering if anyone could confirm for me exactly how the strcpy function works. Basically if I have a malloc'ed value and i strcpy it into a fixed size array, will the process of...
  4. Replies
    13
    Views
    1,908

    What an idiot I am. I could have been looking...

    What an idiot I am.

    I could have been looking for hours and not seen such a stupid error. Thanks for all your help. It is working like a dream now. If I ever come to Surrey I owe you a drink for...
  5. Replies
    13
    Views
    1,908

    I really thought I'd got it working only to find...

    I really thought I'd got it working only to find out that what is being copied into data2 char array is complete and utter nonsense. Characters such as 1/4 and german characters and $ symbols etc. I...
  6. Replies
    13
    Views
    1,908

    I think the problem is that I'm using a program...

    I think the problem is that I'm using a program which simply uses the compiler from Visual Studio to compile its scripts and therefore doesn't provide me with the error messages that a better...
  7. Replies
    13
    Views
    1,908

    Right I'm that close I can almost touch it. To...

    Right I'm that close I can almost touch it.

    To get all of the characters from szTempVIEWSTATE into my char data array I did the following:

    strcpy(data, szTempVIEWSTATE);

    I know this has...
  8. Replies
    13
    Views
    1,908

    Hi 19416 is the length of the string held in...

    Hi

    19416 is the length of the string held in szTempVIEWSTATE. I was therefore attempting to copy the string into the char array I defined at the top of my script which i defined as char...
  9. Replies
    13
    Views
    1,908

    Ok I think I'm starting to understand a little...

    Ok I think I'm starting to understand a little better. So if I declare my array at the top with the appropriate size, e.g. char data[19416] and then capture my string using this code:
    ...
  10. Replies
    13
    Views
    1,908

    Compiler error due to char array

    Hi,

    I am trying to declare a char array in the middle of my script which captures a big long list of characters. The code I am using for this is below:

    char data[] =...
  11. Thanks Dwk and welder your help is really...

    Thanks Dwk and welder your help is really appreciated. And in response to this being a homework assignment. I am a software tester who has recently started doing some performance testing. I have...
  12. I wish I was still in school! I also wish I could...

    I wish I was still in school! I also wish I could get his solution working but I can't.
  13. Replies
    10
    Views
    2,395

    Declaring Variables

    Can you only declare variables at the beginning of a C script? Also, can anyone tell me how you declare a char array and how you copy things into that char array?

    Many thanks.
  14. Hi, Thanks for the response its really...

    Hi,

    Thanks for the response its really helpful. Is it possible to declare variables midway through a script or do you have to do them all at the beginning for C? Basically I was going to declare...
  15. Oh right! So sorry to be a complete novice but...

    Oh right! So sorry to be a complete novice but how do I declare a char array?
  16. But surely even if I had a char array, it would...

    But surely even if I had a char array, it would just store all of the long list of characters into one of the array locations? It wouldn't store one letter per array location?

    e.g.

    Array...
  17. So could you explain the following to me: I've...

    So could you explain the following to me:

    I've declared a variable as char *szTemp

    Inside there I have stored a big long bunch of characters, i.e. DwPSDsfAercecasdaaaofidsjafaplasdfafaasdfa
    ...
  18. Getting a character from a char one at a time

    Is there any way I can extract a character from a char one at a time? i.e. if its 100 characters in total what I'd like to be able to do is put a for loop which takes every character one at a time...
  19. Replies
    5
    Views
    974

    Hi, Thanks for your help on this its much...

    Hi,

    Thanks for your help on this its much appreciated. Is there any way I can extract a character one at a time? e.g. if its 100 characters long what I was thinking I could do is take the first...
  20. Replies
    5
    Views
    974

    Basically I have a VIEWSTATE which I have...

    Basically I have a VIEWSTATE which I have captured and stored in a char. The problem is that I need to encode this into a format which will be understood when it is posted. I am looking to replace...
  21. Replies
    5
    Views
    974

    Help please if possible!

    Hi everyone. I'm completely new to C but I'm using it to do some performance testing. One of the items I capture is a VIEWSTATE which is a massively long char. Basically it includes characters such...
Results 1 to 21 of 21