tiresandplanes

Member
  • Content count

    16
  • Joined

  • Last visited

Community Reputation

133 Neutral

About tiresandplanes

  • Rank
    Member
  1. Need help with a library

    This worked! Thank you very much, I think I was having the most trouble with the LIBCD.lib part.
  2. I posted this in beginners originally but I felt like it'd get answered more quickly in here.   I'm making my first rogue-like using this http://www.kathekonta.com/rlguide/article1.html tutorial and I am having trouble with compiling it.   I'm using Visual studio 2010 and whenever I try to compile the program it comes up with something like "Could not open Console.lib and I'm not sure what I am doing incorrectly. Does the .lib file go into the resources folder in a project? when is says "Static library for the Console interface:" does that mean when I make the project I should make it a static library instead of a win32 console application?   Edit: I basically don't know how to link my library to my project file.   Edit: I think....   Edit: I got it linked but I keep getting this error   1>console.lib(Win32Console.obj) : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification 1>LINK : fatal error LNK1104: cannot open file 'LIBCD.lib'
  3. Need help with a library

    I'm making my first rogue-like using this http://www.kathekonta.com/rlguide/article1.html tutorial and I am having trouble with compiling it.   I'm using Visual studio 2010 and whenever I try to compile the program it comes up with something like "Could not open Console.lib and I'm not sure what I am doing incorrectly. Does the .lib file go into the resources folder in a project? when is says "Static library for the Console interface:" does that mean when I make the project I should make it a static library instead of a win32 console application?
  4. Also anyone that reads this and needs a good c reference online that free and up-to-date I've found http://publications.gbdirect.co.uk/c_book/ to be a great help.
  5. Thanks I plan on learning from a more modern book/ online reference from now on. I'll use "int main()" now also.
  6. Well crap, could someone recommend a website with a c reference that is up to date? I have been using K & R (lol). What is a good website to be learning from? Also, could anyone recommend some up-to-date books on c that are really good?
  7. For some reason this won't compile. This isn't the first time that something hasn't worked from this book so I suspect it's a tiny typo that is messing up the whole thing. Can someone explain to me why this doesn't compile? I'm just starting to deal with strings so I don't know how to call a function from within a string.   #include <stdio.h> main () { int str_number; for (str_number = 0; str_number < 13; str_number++) { printf ("%s", menutext(str_number)); } } /*********************************************************/ char *menutext(n) int n; { static char *t[] = { " -------------------------------------- \n", " | ++ MENU ++ |\n", " | ~~~~~~~~~~~~ |\n", " | (1) Edit Defaults |\n", " | (2) Print Charge Sheet |\n", " | (3) Print Log Sheet |\n", " | (4) Bill Calculator |\n", " | (q) Quit |\n", " | |\n", " | |\n", " | Please Enter Choice |\n", " | |\n", " -------------------------------------- \n" }; return (t[n]); } I get an error on line 15: char *menutext(n)   C:\Documents and Settings\Gary II\Desktop\cprog.c|15|error: conflicting types for 'menutext'|  
  8. Why isn't my array working?

    I am using K & R to learn C and I was just copying what they did. There was a typo in the book, and I didn't know it was bad to use macros.
  9. Why isn't my array working?

    Ahh yeah in the original program I did have the semi there, I had to retype it on a different computer and forgot it. thanks.
  10. Why isn't my array working?

    Ahh thanks! For some reason the book has a semi-colon at the end of a macro. It really threw me off. Must just be a typo in the book. Thank you guys!
  11. Why isn't my array working?

    Hi, I'm not sure why this isn't working. I define SIZE at the beginning but it seems not to work. I replaced SIZE with a different number and it worked fine. Why isn't it recognizing what SIZE is?   #include <stdio.h> #define SIZE 10; main() { int i, array[SIZE]; for(i = 0; i < SIZE; i++) { array[i] = 0 } } Errors I get: C:\Users\Gary\Desktop\c\firstproga.c||In function 'main':| C:\Users\Gary\Desktop\c\firstproga.c|7|error: expected ']' before ';' token| C:\Users\Gary\Desktop\c\firstproga.c|8|error: expected expression before ';' token| C:\Users\Gary\Desktop\c\firstproga.c|10|error: 'array' undeclared (first use in this function)| C:\Users\Gary\Desktop\c\firstproga.c|10|note: each undeclared identifier is reported only once for each function it appears in| C:\Users\Gary\Desktop\c\firstproga.c|11|error: expected ';' before '}' token| ||=== Build finished: 4 errors, 0 warnings (0 minutes, 0 seconds) ===|  
  12. Can someone mentor me?

    I've only been programming for about 2 weeks so I am really at an early stage in my programming development. I do plan on learning SDL later on but I want to really grasp the C++ language before I get into learning libraries. I know C++ isn't all of game programming but that's the place I've chosen to start and plan to stick with it until I really understand the concepts so I can be a useful programmer when it comes to the more complicated stuff. I'd like to thank everyone for answering my questions and helping me out.
  13. Can someone mentor me?

    I am not really at any kind of level to collaborate at this point but possibly in the (hopefully) near future . I didn't mean only C++ forever, just that I want to learn C++ and learn programming using that language and didn't want people to recommend an easier language for me to try instead. Also to answer your question Rip-Off I've started programming a lot more to really get down the syntax and how things work better. I'm taking it slower and programming a lot more.
  14. Can someone mentor me?

    Yeah, I've been doing the code questions. I guess the question I had about vectors didn't really make sense. I know how(the syntax) to make vectors and what they are by definition, but I didn't understand the use for them.You've cleared that up for me a bit, thanks. I think the book is just touching on these things and then it'll go deeper into it later on. Thanks for answering all my questions, everyone. [|:^D