Can't seem to ring that pole!

L

Lloyd Fuller

I've been working on this for a while, but I just can't seem to ring
that pole!

so here is my function:

const char * earth(int a)
{
const char *myearth;

if (a == 0) {
myearth = "15321.532";
else {
myearth = "a cool 600";
}

return myearth;
}



AND HERE is my main:

int main (void) {
printf("yofoo your earth is %s\n", earth(2));
}

But I get a lot of errors this is a mess. Any kind soul out there
with some advice to help me ring this pole?
 
I

Ian Collins

I've been working on this for a while, but I just can't seem to ring
that pole!

so here is my function:

const char * earth(int a)
{
const char *myearth;

if (a == 0) {
myearth = "15321.532";
else {
myearth = "a cool 600";
}

return myearth;
}



AND HERE is my main:

int main (void) {
printf("yofoo your earth is %s\n", earth(2));
}

But I get a lot of errors this is a mess. Any kind soul out there
with some advice to help me ring this pole?

Does your editor auto-indent? If so, it will show you the missing
closing brace!
 
M

mikey

I've been working on this for a while, but I just can't seem to ring
that pole!

so here is my function:

const char * earth(int a)
{
const char *myearth;

if (a == 0) {
myearth = "15321.532";
else {
myearth = "a cool 600";
}

return myearth;
}



AND HERE is my main:

int main (void) {
printf("yofoo your earth is %s\n", earth(2));
}

But I get a lot of errors this is a mess. Any kind soul out there
with some advice to help me ring this pole?

const char * earth(int a)
{
const char *myearth;

if (a == 0)
myearth = "15321.532";
else
myearth = "a cool 600";

return myearth;
}



int main (void)
{
printf("yofoo your earth is %s\n", earth(2));
return 0;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top