• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [newbie]C code does not Run.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [newbie]C code does not Run.


  • Subject: Re: [newbie]C code does not Run.
  • From: kunikyo <email@hidden>
  • Date: Sat, 12 Oct 2002 15:21:18 +0900

Thanks to all for thoose informations especially to Deb Mohan and Ondra Cada who gave
me useful information.

I have learned many things as follows.

1."ProjectBuilder console window does not support console input"
as suggested by Ondra Cada.

I have supposed that console input is supported by ProjectBuilder console window.

2.C code could be run by Terminal. I changed C code a little to separate
echo back and program output.

Program is as follows having two "putchar(c);" using Standard tool.

#include <stdio.h>

int main(int argc, const char *argv[])
{
int c;
c = getchar();
while (c != EOF) {
putchar(c);
putchar(c);
c = getchar();
}
return 0;
}

Terminal input and output are listed below.
This part is copy of Deb Mohan's suggestion.


Last login: Fri Oct 11 15:48:09 on ttyp1
Welcome to Darwin!
[Macintosh:~] kunikyo% cd cCode/
[Macintosh:~/cCode] kunikyo% cd build/
[Macintosh:~/cCode/build] kunikyo% ls
cCode cCode.build
[Macintosh:~/cCode/build] kunikyo% ./cCode
k
kk

big
bbiigg

"cCode" is a holder name of the project saved in home.

3.In debug mode, we can use standard I/O tab window.
By keyboard input in the window, we can run the program.
We can confirm input character, echo buck and program output.
This method is simple and easy.

I am encouraged and get forth to the next step.
I will again appreciate help of all who answered to my question.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Fwd: What about Los Angeles? [was Re: Toronto cocoa programmers?]
  • Next by Date: Cocoa-mongers?
  • Previous by thread: Re: [newbie]C code does not Run.
  • Next by thread: bundles
  • Index(es):
    • Date
    • Thread