Just a quick question ; I'm trying to write a structure which can hold a bunch of strings and grow as more are added.
Usually when using an array of strings I'd implement it like this.
char...
Type: Posts; User: RagingGrim
Just a quick question ; I'm trying to write a structure which can hold a bunch of strings and grow as more are added.
Usually when using an array of strings I'd implement it like this.
char...
Gotta love that charming signature <3
Libcurl is great to play around with !
Oooooh i love this!
On windows you could use a visual basic script or even a batch file . Although using a batch file makes the console visible whereas with a vbs you can decide whether you want...
The source file isn't really for use I just put functions in there ; Anything that might not be apparent , used often or easily forgotten.
If I remember correctly I used stat because you didn't...
#include<stdlib.h>
#include<stdio.h>
#include<sys/stat.h>
int CLenFrom(char *AString,int From);//W
int CPos(char *AString,char *SubString, int Skips);//W
int CLen(char *AString);//W
void...
Wait what? I haven't really played with the sys/socket.h stuff but I have done some socket programming in delphi. A RAT tool that I used in class :p Just speaking from memory. Usually you'll create...
I think I'll take this as a compliment :p my day has been made :p
Thanks for the clarification :D
I must have edited this three times.
Sorry for the assumptions :p So calling free does not set the pointer to NULL?
Is that why it's good practise to do this yourself after calling free?
...
I looked at your coding ( for the first time XD ) and realised that you were freeing the NULL pointer ; That is incorrect because in practise generic pointers ( void pointers ) are set to NULL when...
>> I mean the | 0b1 is the same as +1 right?
>Try it with an odd number.
Sorry didn't state my question correctly , I realise the result would be different because an odd number in binary would...
Something I can answer! omg im giddy! XD
if you do something like malloc or realloc there is a chance you might not have enough memory available to be allocated. Basically you want a setup like...
I was just curious. I thought i'd go ahead and learn some assembly. During that time I saw a trick to figure out a characters case ( the third bit of a sequence indicates the case of a character ) so...
I can't find the edit button -.- I'll just repost ^^
I modified my old code to use the new functions - My memory use doesn't go higher than 336 K which I'm ecstatic about! I think I'm doing...
I did as you suggested. At least I think I did.
void CCopy(char *AString,int FromPos,int ToPos,char *ResultBuffer);
void CCopy(char *AString,int FromPos,int ToPos,char *ResultBuffer)
{...
Alright but are those functions acceptable. I'd like to write them and use them and never think about them again XD Although i'll probably tweak them here and there as i get more expierenced. Like...
#include <stdio.h>
#include <stdlib.h>
int CPos(char *AString,char *SubString,int Skips);
int CLen(char *AString);
int CLenFrom(char *AString,int From);
char *CCopy(char *AString,int...
printf("%s",MemBlock->Data[0]);So Playing Around with structures :
#include <stdio.h>
#include <stdlib.h>
struct MemoryBlock
{
char *Data;
Oh sorry! I forgot how to declare a string literal XD
While i'm here , When declaring a function
Void Test(char *Pointer)
I can now effectively pass an array of characters or a string...
I dont want to be a part of this little fire here but I'd like to add something! When I had my first time ( hehe ) coding I just played around with batch. As far as I'm aware the only way to...
I aggree ^^
Just asking though if you typecast the random digits
(char *)Test
The result would be a string literal no?
Although strictly speaking it's still an array of characters wouldn't...
Unrelated question , which is faster
X += X;
Or X = 2*X;
I cant wait to get to university! :0
Honestly though if you want to do better in your exams I sort of aggree with the first post although i'd say play play play.
Expierence is gained by working...
Hi!
I did as you suggested and turned my compilers warning level to max as well.
I fixed most of the warnings except for one pointing to an unused variable pointing to i in my for loop. I guess...
#include<stdio.h>
typedef int boolean;
#define true 1
#define false 0
char Shift(char Achar,int Shifts)
{
boolean Shiftleft =
Shifts <= 0;
if (Shiftleft)
Shifts=-Shifts;