1

Hi,
I am new to this site.
Can you please help me with this. I have written a C program and i m getting the following errors
1) " 'puts' was not declared in scope "
the same error for 'gets' and 'itoa' command...i have included stdio.h,string.h,stdlib.h,math.h as the header files
2)" expected constructor , destructor or type conversion before '=' token " ......for the code k=1.92 ....i have declared 'k' as a float
3) expected ',' before '}' token

kindly clear my queries
Thank you,
sahasra.

4
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by kenji
0

Can you post the code for your program? That would really help.

It works on my machine. Can you post you code and describe you development environment.

Here is what I did.

#include <stdio.h>
#include <stdlib.h>

void f() {
	float k = 1.92;
	int i = atoi("100");
	puts("hey");
}

Compiler output complains a little because of unused variables.

James

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.