1

I'm writing a code that output an output when using porlandc++ but when using eclipse it doesn't, a "Nothing to build for Help" message appears in the console. my file's name is "Help". Even I've tried to debug it putting a breaking point on the first printf function in the code but the debugger always jump to the end of the code?

I'm new with eclipse so I'll be grateful if you help

/*
 * help.c
 *
 *  Created on: ٠٨‏/٠١‏/٢٠١٤
 *      Author: Salahuddin
 */
#include <stdio.h>

int get_int(void);
double get_double(void);


int main(void)
{
int a;
double b;

    printf("Enter an integer : ");
    a=get_int();
    printf("The integer you entered is : %i",a);

    printf("Enter a double : ");
    b=get_double();
    printf("The double you entered is : %lf",b);

return 0;
}



int get_int(void)
{
int result;
    printf(">");

while(scanf("%i",&result)!=1)
{

    while(getchar()!='\n')
        ;
    printf(">");
}
return result;
}

double get_double(void)
{
double result;

printf(">");
while(scanf("%lf",&result)!=1)
{
    while(getchar()!='\n')
        ;
    printf(">");
}
return result;
}

By the way, when I started debugging, many threads appeared not just one, and when trying to stop them, all of them stop except the last one, don't know why?

as I said I'm new with eclipse trying to learn how to use it in debugging instead of the porland c++

thanks a lot

gaurav5430
  • 12,934
  • 6
  • 54
  • 111
Salahuddin
  • 1,617
  • 3
  • 23
  • 37
  • 1
    Is there suppose to be a header file listed after _#include_ ?? (perhaps ) With that added, your code runs ok. – ryyker Jan 08 '14 at 17:19
  • Can't reproduce: http://ideone.com/iOQkaN. As suggested by @ryyker; I included ``. – haccks Jan 08 '14 at 17:20
  • Also, there is nothing in your posted code that suggests that multiple threads should be propagated. Are you referring to some other phenomena?, such as many windows?, or many comments?, many error messages? – ryyker Jan 08 '14 at 17:24
  • Thins is strange, I wrote #include in the post, then it appears without , I've tried to fix it but didn't succeed – Salahuddin Jan 08 '14 at 17:25
  • many "Help.exe[C/C++ Application]" lines appear in the upper left "debug" window – Salahuddin Jan 08 '14 at 17:26
  • regarding _Nothing to build for Help_: If your environment is displaying this, it would seem to indicate that your project has already been built, and no element of that project has been changed since. If you want to force a re-build, your environment should have an option to do that. ***[LOOK HERE](http://stackoverflow.com/a/6803350/645128)*** for an additional comment on how to do that. – ryyker Jan 08 '14 at 18:22

0 Answers0