If you decide to use codeblocks with mingw Here's a link on how to set it up I'm using codeblocks with mingw.
Type: Posts; User: $l4xklynx
If you decide to use codeblocks with mingw Here's a link on how to set it up I'm using codeblocks with mingw.
Good to hear it's working fine.. now you can go ahead and refine your code. don't forget to follow the code snippet that I provided to you in the link, that removes the unnecessary character input.
I know that it will not work according to the code that you posted.
I don't see the relation of the 2 scanf() input to the goal of your program which is to print chars to a new line by line....
Were you able to enter a string using gets()? if not, then the string will not be printed. Prior to input string using gets you have 2 scanf()'s, I presume, that you won't be able to input any value...
Or you could just use isalpha() to capture all alpha characters from the input and disregard those non-alpha characters.
You could try to use the idea about using fgets right here
I see... I guess I'll just stick with my log-in name... :D thanks
I still have a TC compiler if you need it I may send it to your e-mail... pm me if so..
whew!!! thanks everybody... I have now a bug free input... I'll be posting again next time...
ok, I've tried all the example that was provided and I truly appreciate it a lot. I applied laserlight's last code.
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
char...
Yes I'm sorry, I forgot to change the code to it's original state for I was playing with it earlier.
Yes.. I modified the code and applied sebastiani's code:
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
char *getString( char *buffer, size_t size, FILE* input );
Hi to all... I checked the FAQ and some tutorials over the net regarding not use
scanf or gets just use fgets to control buffer. I created this code for a test but it seems
like the excess buffer...
And those objects that were created in the client code will send a message to the class and perform whatever behavior the object requested?
If you want experts here to help you properly try to help them as well to understand your code properly. Indent it, divide the processes using functions.
As to my understanding, The header file is a different file: graphics.h and a library I presume is a different file as well: graphics.lib... if the pointer to a structure is in the graphics.lib...
I understand most of the answers that you provided but this one. let's say:
|Library | <-- where the pointer to a structure is etc.
struct A {
//statement....
};
typedef A *alibrary;
I tried to use your code using codeblocks with mingw and it worked... I wonder what error you're encountering.?
edit: nevermind it's now resolved :D...
I somehow understand what a library is in computer programming.
Library is a collection of subroutines or classes to provide services on creating an application.
I read these paragraphs and...
hi, is there anyway I can change my log-in name? I can't see it in "User CP"..
The string "char string[40]" doesn't contain valid things, though, that's why it's not printing out the string that you want.
Since "char string[ 40 ]" doesn't contain valid things, This code...
sorry but this made me laugh..... :D
I see, but why put fgets as an expression in the if condition?
yes they can but it's wrong in C, that's what I meant... But in his program I don't think that he needs to initialize the array.
I agree, it would be better if you could provide us the output that you're having for the people around to see what's actually happening.
btw, fgets is also including the newline in your string...
laserlight means that you're having problem with getline.
Compare your getline to the getline documentation right here