[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

C prog efter # c: Linux - Friheden til at programmere i C



Hej alle

Ha rigennem længer tid spekuleret over at starte med at programmere lidt igen - så jeg satte mig for, at prøve den indbyggede c i Mnadrake 9.1

Version:
gcc (GCC) 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)

Men allerede i et af de første eksempler render jeg ind i et problem

Koden er

#include <stdio.h> // Stream declarations

int main()
{
        int procent = 17;
        int kroner = 100;
        int resultat;

resultat = procent*kroner / 100

puts("resultat er", resultat);

        return 0
}

fejlmeddelelsen er:

hello.cpp: In function `int main()':
hello.cpp:11: parse error before `(' token
hello.cpp:14: parse error before `}' token

Jeg er lidt lost det er jo ikke alverdens info man får her har prøvet at modificere "puts("resultat er", resultat);" med printf ændre semicolon osv osv.

Kodede i sin tid i pascal - basic - comal80 + noget mere jeg ikke kan huske så jeg forstår den generelle struktur - men fejlmeddelelsen er lidt for intetsigende så det siger mig ikke en brik :(

Nogen der ellers kan henvise til andre online C bøger på nettet for en newb så smid endelig et link

MvH
Mark Larsen



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:09 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *