7 Replies - 782 Views - Last Post: 02 October 2008 - 11:21 PM Rate Topic: -----

#1 dudzken8   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 01-October 08

can anyone understand about this my topic?

Post icon  Posted 02 October 2008 - 09:36 PM

#include <iostream.h>
#include <string>
using namespace std;
int main ()

int num1=yehey; //--the error is this^^
int num2=anamarie;
int num3=no_devil_lived_on;
char c = (yehey)str->Chars[20];
char c = (anamarie)str->Chars[20];
char c = (no_devil_lived_on)str->Chars[20];
String reverse(String &string1)

{
String string1;
for (int num1 = yehey.length()-1;  yehey>=1; yehey--)
string1 = yehey[num1];
return (string1);
}

bool yehey(String string1)
{
if (yehey==reverse(string1))
return(true);
else
return(false);
}
String reverse(String &string2)
{
String string2;
for (int num2 = anamarie.length()-1;  anamarie>=2; anamarie--)
string2 = anamarie[num2];
return (string2);
}

bool anamarie(String string2)
{
if (anamarie==reverse(string2))
return(true);
else
return(false);
}
String reverse(String &string3)
{
String string3;
for (int num1 = no_devil_lived_on.length()-1;  no_devil_lived_on>=3; no_devil_lived_on--)
string3 = no_devil_lived_on[num3];
return (string3);
}

bool no_devil_lived_on(String string3)
{
if (no_devil_lived_on==reverse(string3))
return(true);
else
return(false);

}

int main()
{
String string1;
p1.in>>num1;
p1.out<<"yehey:";
if (yehey(string1)==true)
p1.out<<"true"<<endl;
else
p1.out<<"false"<<endl;
return(0);
}

{
String string2;
p1.in>>num2;
p1.out<<"anamarie:";
if (anamarie(string2)==true)
p1.out<<"true"<<endl;
else
p1.out<<"false"<<endl;
return(0);
}
{
String string3;
p1.in>>num3;
p1.out<<"no_devil_lived_on:";
if (no_devil_lived_on(string1)==true)
p1.out<<"true"<<endl;
else
p1.out<<"false"<<endl;
return(0);
}



** Edit ** :code:

Is This A Good Question/Topic? 0
  • +

Replies To: can anyone understand about this my topic?

#2 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6833
  • View blog
  • Posts: 31,494
  • Joined: 10-May 07

Re: can anyone understand about this my topic?

Posted 02 October 2008 - 09:40 PM

It's interesting that you ask if anyone understands about your topic.

Chances are the answer is no, & here is why.

1) You posted C/C++ code into a Visual Basic topic (don't worry, I'll move it for you)
2) You didn't use code tags
3) You didn't say what error you are getting, or any questions, you only posted code
4) Since you posted a general question as the topic,... then there is no topic!

So, in summary. Please tell us what exactly the problem is with the code, & what your questions may be :) We'll do our best to help you out!
Was This Post Helpful? 0
  • +
  • -

#3 KYA   User is offline

  • Wubba lubba dub dub!
  • member icon

Reputation: 3207
  • View blog
  • Posts: 19,239
  • Joined: 14-September 07

Re: can anyone understand about this my topic?

Posted 02 October 2008 - 09:42 PM

I'm particularly fond of the no_devil_lived_on variable

sounds hot!
Was This Post Helpful? 0
  • +
  • -

#4 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6833
  • View blog
  • Posts: 31,494
  • Joined: 10-May 07

Re: can anyone understand about this my topic?

Posted 02 October 2008 - 09:45 PM

Where you are setting the value to an int...

int num1=yehey; //--the error is this^^



yehey doesn't exist yet, it hasn't been declared. Plus, why are you setting an int to another variable?
Was This Post Helpful? 0
  • +
  • -

#5 dudzken8   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 01-October 08

Re: can anyone understand about this my topic?

Posted 02 October 2008 - 10:53 PM

#include <iostream.h>
#include <string>
using namespace std;
int main ()

int num1,num2,num3;
char c = (yehey)str->Chars[20];
char c = (anamarie)str->Chars[20];
char c = (no_devil_lived_on)str->Chars[20];
String reverse(String &string1)

{
String string1;
for (int num1 = yehey.length()-1;  yehey>=1; yehey--)
string1 = yehey[num1];
return (string1);
}

bool yehey(String string1)
{
if (yehey==reverse(string1))
return(true);
else
return(false);
}
String reverse(String &string2)
{
String string2;
for (int num2 = anamarie.length()-1;  anamarie>=2; anamarie--)
string2 = anamarie[num2];
return (string2);
}

bool anamarie(String string2)
{
if (anamarie==reverse(string2))
return(true);
else
return(false);
}
String reverse(String &string3)
{
String string3;
for (int num1 = no_devil_lived_on.length()-1;  no_devil_lived_on>=3; no_devil_lived_on--)
string3 = no_devil_lived_on[num3];
return (string3);
}

bool no_devil_lived_on(String string3)
{
if (no_devil_lived_on==reverse(string3))
return(true);
else
return(false);

}

int main()
{
String string1;
p1.in>>("num1;
p1.out<<"yehey:";
if (yehey(string1)==true)
p1.out<<"true"<<endl;
else
p1.out<<"false"<<endl;
return(0);
}

{
String string2;
p1.in>>num2;
p1.out<<"anamarie:";
if (anamarie(string2)==true)
p1.out<<"true"<<endl;
else
p1.out<<"false"<<endl;
return(0);
}
{
String string3;
p1.in>>num3;
p1.out<<"no_devil_lived_on:";
if (no_devil_lived_on(string1)==true)
p1.out<<"true"<<endl;
else
p1.out<<"false"<<endl;
return(0);
}



** Edit ** :code:
Was This Post Helpful? 0
  • +
  • -

#6 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6833
  • View blog
  • Posts: 31,494
  • Joined: 10-May 07

Re: can anyone understand about this my topic?

Posted 02 October 2008 - 10:54 PM

I don't know if you missed the 1st request... what is the problem exactly?

also... please use code tags.
Was This Post Helpful? 0
  • +
  • -

#7 dudzken8   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 01-October 08

Re: can anyone understand about this my topic?

Posted 02 October 2008 - 11:14 PM

PROBLEM: i cant build it succesfully the error is an int or my program has been wrong proccess...what is the exact int of my program,,^^im very very NEW her in the furom i dont know what is rules her..

int num1,num2,num3;
this the error,,can anyone build my program or edit the some parts of my program,,,thank youu so much,,
Was This Post Helpful? 0
  • +
  • -

#8 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6833
  • View blog
  • Posts: 31,494
  • Joined: 10-May 07

Re: can anyone understand about this my topic?

Posted 02 October 2008 - 11:21 PM

You might want to try changing this line

int main ()

to this

 int main () { 


or even this (if you prefer)

 int main () 
{ 


... Or... (after looking at your code some more) You should probably remove one of the int main functions, as you can only have one per program.

View Postdudzken8, on 3 Oct, 2008 - 02:14 AM, said:

im very very NEW her in the furom i dont know what is rules her..

True, but it's very hard to help without knowing the problem is. :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1