Hi people I've problem with method which me calls the error error C3867 'mojetrida::udelej': function call missing argument list; use '&mojetrida::udelej' to create a pointer to member
Unfortunately I don't know what do I do with it...I indicated the place where I've the error.It's indicated by bold letter..thank you for your advices...
here's the code:
#include<iostream>
#include<cstring>
#include<string>
using std::cout;
class mojetrida
{
private:
char *podretezec;
char *ps;
int citac,i,p;
int kraska;
public:
void udelej();
mojetrida();//,int citac,int p);
~mojetrida();
};
mojetrida::mojetrida()//,int citac,int p)
{
podretezec="debilek";
kraska=strlen(podretezec);
podretezec=new char[];
ps=new char[kraska];
citac,i,p=0;
};
mojetrida::~mojetrida()
{
delete []podretezec;
delete []ps;
};
void mojetrida::udelej()
{
using std::cerr;
//int citac=0;
//int p=0;
ps=podretezec;
int krasa=strlen(ps);
for(i=0;i<krasa;i++)
{
if (ps[i]=='.')
{
++citac;
}
else if (ps[i]!='.')
{
break;
};
};
cerr<<"vystup je"<<ps<<citac;
};
int main()
{
using namespace std;
cout<<"zadejte retezec";
mojetrida obj; obj.udelej; // in this place is depicted the error...
return 0;
}