Re: Struggling with libraries
websnarf@xxxxxxxxx wrote:
Tony Burrows wrote:
I'm just learning C as another language, and I'm trying to build some
utilities into a library. I have this (crude I know) function:
void insert(char* insrt, char* source, int place){
char temp[strlen(insrt)+strlen(source)+1];
Your compiler lets you declare that? Is this some new C99 feature?
Yes, variable length arrays are new in C99.
Robert Gamble
.
Relevant Pages
- Re: int or long int?
... depending on "implicit int" is considered poor ... why your compiler warned you about it (unless you're using one of the ... declare the variable as int. ... (comp.programming) - Re: int or long int?
... depending on "implicit int" is considered poor ... why your compiler warned you about it (unless you're using one of the ... declare the variable as int. ... (comp.programming) - Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP
... It could be - but just why you should want to declare something as, ... just declare everything as int or long. ... In both cases, you're saying something ... In my current compiler, int and long are the same size. ... (comp.object) - Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP
... It could be - but just why you should want to declare something as, ... just declare everything as int or long. ... In both cases, you're saying something ... In my current compiler, int and long are the same size. ... (comp.programming) - Re: Warning comes when using Unions
... When I add data types before each one, ... int x, y; ... His approach is the one I normally use for embedded work, where the compiler ... over to the next byte automatically and if you declare fewer than the number of ... (comp.lang.c) |
|