Questions about C

I know this isn't the best place to ask this, this forum being dedicated to C++ and all, but I have two questions about C. One, can structures inherit? Second, is there an inline command or something similar or can you just inline without explicitly saying so?
Thanks for any answers!
~Dudester~
1.) Nope
2.) I believe you can put inline in front of the function to suggest to the compiler that it should try to inline it.
I was just making sure because Notepad++ doesn't recognize "inline" as a keyword when set to C like it does when set to C++.
inline was added in C99, so Notepad++ is probably using the C89 scheme.
Out of curiousity why are you using notepad++ for writing your source files instead of a modern IDE? Not that there is anything wrong with the tool.
Well I'm compiling the final code with MPLAB C18. I don't like the IDE much and Notepad++ has some nice features and it works well on my archaic computer. Plus I don't know if my VS C++ IDE has different intellisense settings for C. I'm hoping to get it working with as few bugs as possible and typing half of it in C++ rather than C would cause a few problems.
I've got another two questions. Are there variable parameter lists in C (in the C89 scheme) and do they use the same syntax as C++? What is the syntax for generating dynamic arrays with pointers? Do you still use the "new" keyword or the memalloc method?
Last edited on
Are there variable parameter lists in C (in the C89 scheme) and do they use the same syntax as C++?
Yes and yes.

What is the syntax for generating dynamic arrays with pointers? Do you still use the "new" keyword or the memalloc method?
There's no new in C.
http://www.cplusplus.com/reference/clibrary/cstdlib/malloc/
http://www.cplusplus.com/reference/clibrary/cstdlib/free/
http://www.cplusplus.com/reference/clibrary/cstdlib/calloc/
http://www.cplusplus.com/reference/clibrary/cstdlib/realloc/
Thank you guys so much!
Topic archived. No new replies allowed.