From: Peter Nilsson on
happytoday wrote:
> I compiled that program under turbo C without any problems

Then Turbo C must be even crapier than I thought.

> but with sunstudi I found those errors:
>
> "pnt02ma1.c", line 37: warning: implicit function declaration: system

You should include <stdlib.h> to get the prototype for system(), even
if the implicit one (under C90) happens to be okay.

> "pnt02ma1.c", line 58: operands must have arithmetic type: op "*"
> "pnt02ma1.c", line 58: assignment type mismatch:
> pointer to float "=" double
> "pnt02ma1.c", line 59: operands must have arithmetic type: op "/"
> "pnt02ma1.c", line 60: operands have incompatible types:
> pointer to float "-" double
> "pnt02ma1.c", line 61: operands must have arithmetic type: op "/"
> "pnt02ma1.c", line 62: operands have incompatible types:
> pointer to float "-" double
> "pnt02ma1.c", line 62: warning: improper pointer/integer combination:
> op "="
> cc: acomp failed for pnt02ma1.c
>
>
<snip>
> #include "stdio.h"

#include <stdio.h>

>
> void input(float *);
> void conversion(float *,int *,int *,int *);
> void print_reults(float *,int *,int *,int *);
> char another(void);
>
> int main ()
> {
> float meter;
> int yards,feet,inches;
> do {
> system("cls");

This is unlikely to work under *nix.

<snip>
> void conversion(m,y,f,i)
> float *m;
> int *y,*f,*i;

Don't use old K&R style function declarations.

void conversion(float *m, int *y, int *f, int *i)

> {
> m=m*100.0/2.54;

What is the type of m? What does it mean to multiply a
pointer by a double?

<snip>

--
Peter