So, before I go any further, let me explain... I know how to do this in c++ with fstream and std::string and getline and so on and so forth. Im writing my code solely in c however. I can't get g++ installed so figured it was a good excuse to learn c instead of using the equivalent c++ abstracts.
My problem is, I'm making a game in c that I have made in c++ but have ran into an issue with my map. I want to read in my map from a file which just looks like this:
Name of Town
* * * * * * *
* * * * * * *
* * * * * * *
etc...
so i tried using fscanf to first read in the name of the town (stored in a char*) then read in the characters (in this case '*')(not including white spaces becuase i can just print those) into another char*. what is the better way to do this?
while(!feof(somefile)) in C is just as wrong as while(!somefile.eof()) in C++. Where do these things even come from?
*checks this website* oh.. *files a bug report*
ubuntu. ive actually done it before on the same hard drive with the same disc on the same network. idk why it doesnt work now. ill try yum. can someone tell me what the difference between nano and vim?
can someone tell me what the difference between nano and vim
vim ( http://www.vim.org ) is modernized vi, which is the Unix text editor from the 70s. It's very powerful, and very hard to learn. Some people (myself included) use it for programming.
nano ( http://www.nano-editor.org ) is a simple text editor that was a slightly improved pico, which was the text editor created for the popular Unix mail client pine. It's easy to learn, but it's text-oriented, not program-oriented.
yeah i figured that. i was told to use that when i was setting up lamp. why is vim hard? i use it and it took me about ten minutes to learn, and i had no prior knowledge of how to use it