Thanks!
Type: Posts; User: guillermoh
Thanks!
What would be this other method?
Hello.
Is there a better way to know if a number is even or odd than checking if it is divisible by two?
ThankS
Thanks for your answer.
I would like to know if it's just matter of style or it is wrong to do it this way (my way)?
Hello.
I was wondering if it is "healthy" to define return statements in each switch statement, I mean:
int function (...)
{
int data;
...
Hello,
Could somebody explain me the difference between:
static char* function(){...
and
char* function(){...
Hello.
What are the implications of free() a pointer twice?
....
gchar *string;
....
Hey I found the way to get the list of interfaces. Here is how (for for those interested in the subject)
/* Show the list of interfaces to the user. */
void
show_interfaces(void)
{
...
Hello people.
How dangerous it is to use global/external variables?
Suppose I have several ".c" and ".h" files in a project. This struct is defined:
struct example
{
char *element_A;
Hello to all.
I'm developing a simple sniffer using, for now, the library set: libpcap. I'm using this functions to open the socket for reading.
int sock;
char *dev;
char...
Thanks.
What about
static const char* string[] = .... ?
I understand. So this would be fine
const char *text[] = {"memory","information"};
int main()
I'm trying to solve this:
Does this solve my problems?
int main()
{
gchar *string;
while(i<100)
{
...
Sorry. typing mistake
Do I need to malloc()?
Hello to all.
Is this program licking memory?
int main()
{
while(i<100)
Ok.
But what if I want to do this:
printf("Hablo <TAB> Espa\303\261ol"); ?
Hello.
I know I cant insert a "ñ" is a string doing "Espa\303\261a". Where can I find all this conversion. For example, how can I do to insert an Horizontal Tab in a string?.
Thanks for your...
Thanks a lot!
I read the Work with files (C) section but it really doesn't explain how to use this function
Hello.
I want to use the fgets() function to read from a file. I know this function reads n number of bytes and that it stops when encounters a newline character. This is the syntax:
char *...
Try initializing the line array.
Try this
....
while (1)
{
scanf("%c", &selection);
if (selection == 'D')
{
Thanks a lot. That's what I thought.