|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Problem opening a *.txt file in Xcode Command Line Application
Good Morning,
I am trying to manipulate a *.txt file in a Command Line Application in Xcode. There is a text file that has for example two lines, with words/phrases and some numbers. All I want to do is to search for the numbers, save them in some variables, sum them and after, write them in a new file. My problem is that when I make fopen I get an error error: expected '=', ',', ';', 'asm' or '__attribute__' before each word of my file I don't know what to do, and the problem is that I don't know very well programming in C. I am trying to learn. Any help for understanding the problem and solving it would be appreciated! I am waiting in hope for your enlightement! ![]() George
|
|
|
|
0
|
|
|
#2 |
|
Those look like compiler errors. You should not be trying to *compile* a txt file.
|
|
|
|
0
|
|
|
#3 |
|
If you're programming in C, you don't need to use XCode. You can use TextWrangler (free), and write code in that, save it, and compile it from in Terminal with the command:
Code:
gcc -o your_program_name /path/to/your/program Code:
gcc -o my_cool_program ~/Desktop/my_prog.c (~ is your home directory in case you didn't know)
__________________
Official MR IRC
Slow news day? Never fear, Digitimes is here. Serving up free hits for techblogs everywhere. |
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| thread | Thread Starter | Forum | Replies | Last Post |
| Trouble reading a .txt file with Xcode C++ | aprofetto | Mac Programming | 11 | Jan 15, 2013 11:08 PM |
| Making a log file in Xcode Application | arjit | Mac Programming | 6 | Nov 23, 2009 06:04 PM |
| xcode command line c++ issues | dvince2 | Mac Programming | 3 | Jan 2, 2009 05:14 AM |
| Always open .txt files in textmate. | Kalixa | Mac Applications and Mac App Store | 3 | Aug 20, 2007 01:30 PM |
| Xcode 2 Freezes in C++ Command line tool | CookieMook | Mac Programming | 7 | Oct 1, 2006 09:39 PM |
All times are GMT -5. The time now is 06:45 PM.







Linear Mode

