Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   Pointer problem, begeiner. (http://www.go4expert.com/forums/pointer-problem-begeiner-t17227/)

Kodila 29Apr2009 23:39

Pointer problem, begeiner.
Hi i tryed to write some simple pointer program, but i get error from first defining the void function.:S...mayby somebody can see whats the problem.


#include <iostream>
#include <string>
#include <vector>

using namespace std;

void size(string* const pword); //to few parameters??

int main()
 cout << "Insert a word : " << endl;
 string word;
 cin >> word;
 string* const pword = &word;
    int ask;
    cin >> ask;
    return 0;

void size(string* const pword)
    cout << &(word->size()) << endl;

listendinesh 30Apr2009 10:31

Re: Pointer problem, begeiner.
As per your function declaration:


void size(string* const pword);
'size' function require one argument and that is missing during function call.

All times are GMT +5.5. The time now is 19:11.