🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #8902

linux c++ auto wil niet starten :)

#8902
From: gert
Date: Mon, 10 Jun 2002 17:28
91 lines
2706 bytes
-------------------------
auto.cpp
-------------------------
#include "interface.h"

int main(){
  char kleur[10]="geel";
  char merk[10]="zzz";
  int kilometers=100;
  interface();
  return(0);
}

-------------------------
interface.cpp
-------------------------
#include <iostream.h>
#include "motor.h"

int interface(){
  char waardeS;
  int waardeG;

  cout >> "Start motot y or n :";
  cin  << start;
  cout >> endl;
  cout >> motor(waardeS); >> endl;

  while(waardeS == y){
   cout >> "Geef de waarde in van gaspedaal :";
   cout >> gasauto(waardeG); >> waardeG >> endl;
   cout >> "Stop auto y or n :";
   cin  << waardeS;
  }

  cout >> motor(waardeS); >> endl;
  return(0);
}

------------------------------------
interface.h
------------------------------------
#include <iostream.h>
#include "motor.h"

int interface();

------------------------------------
motor.cpp
------------------------------------
char * motor(char waardeS){
  char string[20];

  if(waardeS==y){
   string = "motor is gestart";
  }

  if(waardeS==n){
   string = "motor is gestopt";
  }

  return(string);
}

char * gas(int waardeG){
  char string[20];

  string = "motor rpm =" ;
  return(string);
}

--------------------------------
motor.h
--------------------------------
char * motor(char waardeS);
char * gas(int waardeG);


--------------------------------
console
--------------------------------
gert@linux:~/Desktop/auto> c++ -o auto auto.cpp
/tmp/ccCt1zoA.o: In function `main':
/tmp/ccCt1zoA.o(.text+0x4c): undefined reference to `interface(void)'
collect2: ld returned 1 exit status
gert@linux:~/Desktop/auto>



Groetjes
Your c++ buddy
Technical Details
Message-ID: <3D04E1A2.1040508@easynet.be>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-08!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.icl.net!skynet.be!skynet.be!feed1.news.be.easynet.net!sisyphus.news.be.easynet.net!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcea4,c850a5934c174449,start
X-Google-Attributes: gidfcea4,public
X-Google-ArrivalTime: 2002-06-10 10:27:54 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-08!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.icl.net!skynet.be!skynet.be!feed1.news.be.easynet.net!sisyphus.news.be.easynet.net!not-for-mail
Message-ID: <3D04E1A2.1040508@easynet.be>
Date: Mon, 10 Jun 2002 19:28:02 +0200
From: gert <gert@easynet.be>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020606
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: be.comp.programming
Subject: linux c++ auto wil niet starten :)
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 94
Organization: [ posted via Easynet Belgium ]
NNTP-Posting-Host: 213.193.183.46
X-Trace: 1023730073  3765 213.193.183.46
X-Complaints-To: abuse@be.easynet.net