implicit declaration of function error

From: Jason (jason.carney1_at_btinternet.com)
Date: 01/01/04


Date: Thu, 1 Jan 2004 08:44:18 +0000 (UTC)

Hi,

Im running windows xp pro and compiling using dev c++ 4. I have the
following situation:

#include <iostream>
#include <string>
using namespace std;

int main() {
    string str;
    func(str);
}

void func(string str) {
    //do stuff, call some other classes member functions etc
    func2(str);
}

void func2(string str) {
    //do more stuff
}

It says 2 errors occur with the following output:

7 errormain.cpp
 implicit declaration of function `int func(...)'
7 errormain.cpp
 warning: cannot pass objects of type `string' through `...'
12 errormain.cpp
 implicit declaration of function `int func2(...)'
12 errormain.cpp
 warning: cannot pass objects of type `string' through `...'

What am I doing wrong???

Thanks for any help in advance
jason



Relevant Pages

  • RE: Controling Modal Dialogs (Solution)
    ... doesn't return until the 'modal' browser returns. ... string varOptions) ... public void DocumentComplete ... int rc = winDisp.Invoke(rgDispId, ref guid, 0, ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: question about assigning null to a reference object
    ... String getAuthor() ... int getPages() ... void setAuthor ... b.setTitle("Thinking in Java 54th Edition"); ...
    (comp.lang.java.help)
  • Re: nativeMethod error
    ... private void InitializeComponent() ... public int cmdID; ... bool TopLevelContainer ... string LocationName ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: parser needed
    ... static int tokenlen(const char *str, ... str - string containing expression ... ignores white space between tokens ...
    (comp.programming)
  • Re: The Sort Excercise
    ... void SetSortStrategy(SortStrategy* s) { ... void SetArray(string* arr, int len) { ...
    (comp.object)