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...
Type: Posts; User: Godders_2k
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...
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...
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...
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...
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...
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...
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...
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...
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:
...
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[] =...
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...
I wish I was still in school! I also wish I could get his solution working but I can't.
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.
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...
Oh right! So sorry to be a complete novice but how do I declare a char array?
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...
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
...
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...
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...
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...
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...