the reason why "someone" included the terminology of "bad programming practices" is because they are bad programming practices, hence, should be avoided. I see no reason to hold on to a very buggy...
Type: Posts; User: charlitos
the reason why "someone" included the terminology of "bad programming practices" is because they are bad programming practices, hence, should be avoided. I see no reason to hold on to a very buggy...
did you use the code I posted?... we told you to get rid of the loop and other stuff, use the code I posted, its pretty much the same you had plus some recommendations already given on here.
No its not wrong in C, and I always initialize my string arrays just in case I forget to put a null character after I use some functions to manipulate strings. It is just a good programming practice...
lol, here is the light Neo:
#include<stdio.h>
#include<string.h>
#include<ctype.h>
#define MAX 100
Id like to know what are the major advantages on using one or the other? In other words what makes them differ and why this difference is necessary ?
You have a few errors there but just look at this example that works and you should be able to get yours right:
typedef struct
{
char color[20];
char size [1];
int qty [5];
use sizeof on your call to malloc and also try to avoid the use of void pointers if theres another alternative.
oh sorry, i didnt notice that one, thanks a lot
i included all the headers
and the function prototype is also on top
the fd is not like that on my code i just made a mistake after i copied
anyway i edited my code the same way I have it, so...
Can somebody help me to find out why does my loop go forever, even when im telling it to stop once it finds NULL?
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include...
how do I clear a string in C after I used it? I just want to clean it and fill it up with null characters.
sorry I think I blamed the wrong function...here is the code
//this function works great it adds the second string after the
//null character in base propperly
int build_stream(char * base...
Hi guys,
Im trying to store characters beyond my '\0' character in an array of char
char myvar[256] = {};
Im filling up character by character trying to get something like:
H | E | L |...