Ok thanks for that. It looks like my gcc is working from cygwin/bin.
it appears that the gcc libraries are located in C:\cygwin\lib\gcc-lib and inside folders "i686-pc-cygwin" or "i686-pc-mingw32"...
Type: Posts; User: recluse
Ok thanks for that. It looks like my gcc is working from cygwin/bin.
it appears that the gcc libraries are located in C:\cygwin\lib\gcc-lib and inside folders "i686-pc-cygwin" or "i686-pc-mingw32"...
Hi, I'm using GCC on windows and want to know where on my computer the gcc location that i'm using is linking to. I remeber installing gcc and then cygwin(which had gcc in it aswell) and i'm not sure...
i fixed my problem .thanks .
i have encountered a new problem with the code i posted above, if there is no space after the last string then the last string is not terminated properly , e.g "i eat yellow people" ends up with...
how can i convert a character to an integer?
e.g. char a = '8'; then convert a to an integer, so it can then be converted to binary.
i know atoi converts a string to an integer, but i...
do i need to write the '\n' as a character or as a string? i'm assuming as a character, however doesnt fwrite only write strings?
i am trying to write 2 strings to a file ,however after each string has been written i want to start a new line , i know that "\n" is the newline character however whenever i try and fwrite this it...
i have modified this slightly to check that the array does not go out of bounds, however another problem i am having is that if i input " i am a god" (with more than one space between...
thanks salem. my while loop was also incorrect because i was checking for a newline when i should have been checking for a '\0'.
Hi, i have a string containing " i am a god" and i want to take this array of charecters and split it into four strings(where the spaces are) so the first string is "i" , second is "am" etc... ...
i'm trying to open a file and read all the charecters and remove all punctuation then write back to the file , however for words like that's i dont want to remove the ' . for example:
bin.txt
...
sorry i'm still confused :( can i not just do what prelude said and remove FILE *ifp from main , as it has been declared in my readdata function?
so in my main function do i have to initialise ifp to NULL ifp=NULL; , or ifp=fopen("birthday.txt","r"); . if i did the latter wouldnt that just mean i'm repeating code?
no sorry quzah , i dont see the problem
thanks sean , its now opening the file but not doing anything else, is it in another endless loop somewhere?
i get 1 compiler warning : local variable 'ifp' used without having been intialized. ...
sorry for reviving this thread but ive been working so havnt had much of a chance to continue with my learning of c. when i try and open the file it doesnt seem to be finding it, where should the...
sorry salem , this is the first time i have created my own header files and so i forgot to change my linked list structure.....
is this correct?:
typedef struct linked_list {
DATA...
thanks quzah the link was helpful. i think my insert function is now working properly , however the arguements that i'm passing to my create function are wrong: here is my code(including the header...
does this mean that i just have to change it in that part of the code or throughout because when i change
LINK create( char h, Element *t )
to
LINK create( char *h, Element *t )
i get...
thanks itsme86, i've narrowed down the crashing of my program down to the INSERT function(as the poster above said it must be going into an endless loop , heres my code:
LINK insert(FILE *ifp)...
this is my code now
#include "list.h"
#include <stdlib.h>
/*Function to create a list recursivly*/
so will i have to store the strings in an array?
i'm trying to read words from a .txt file and then put them in a linked list and then print them out.
here is the text file:
hello my birthday is in may hello my birthday is in may
i...
i'm not sure if this is in the proper forum however i will post it anyway.... i'm looking for a command line compiler such as gcc to use on my windows machine, i currently use dev-c++ and/or...
thanks for the help thantos, i was having a stupid moment, ive fixed my problem now