Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C
#include <stdio.h>
#include <stdlib.h>



int main()
{
    float m,km;
    printf("enter kilometer" );
    scanf("%f", km);
    m= 1000*km;
    printf("k id %f" , m);
    return 0;
}


What I have tried:

multiple definition of main error
Posted
Updated 22-Jun-23 22:55pm
v2

1 solution

Either that isn't your complete code, or your compile / link instructions are including other code, from either another C file or from a ready compiled library.

Check how you compile and link your app - it should be relatively obvious what you are including that you shouldn't.
 
Share this answer
 
v2
Comments
CPallini 23-Jun-23 4:57am    
5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900