Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
December 16, 2017, 09:06:19 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register Chat  
Pages: [1]   Go Down
  Print  
Author Topic: Basic question on the files  (Read 1717 times)
yvonnef
Newbie
*
Posts: 9


« on: July 17, 2009, 12:22:48 AM »

When we're doing all these test programs like 7.6 in exercise 3, are we supposed to create copies of the whole FractionTest folder to use the main.m instead of the FractionTest.m? I can't figure out how to have two "main" files within one FractionTest program group. I got an error from the compiler saying there were two "main" programs.
Logged
esc
Global Moderator
Full Member
*****
Posts: 230


« Reply #1 on: July 17, 2009, 12:14:01 PM »

If you want to use the same main.m and have different code in there for different exercises, you can use #if (or ifdef).  See chapter 12 (The Preprocessor).
Logged
skochan
Administrator
Hero Member
*****
Posts: 3114



« Reply #2 on: July 17, 2009, 12:19:26 PM »

As Wendy said, or comment out the main function(s) you're not using.  There can only be one function called main.
 
Cheers,

Steve Kochan
Logged
yvonnef
Newbie
*
Posts: 9


« Reply #3 on: July 17, 2009, 11:12:21 PM »

is there a way to have different versions of the same program? Since the program name also names the folders I tried to switch to an A version, but then it seemed to need changes all over the place to rename the folder name within the code. I just couldn't figure out a fast way have copies so we can try make all of these mods for the exercises and not change the same file over and over again.

Is there a way to create different builds to accomplish this?

It seems like you could do a snapshot, but you need to have that reserved to keep you out of trouble.
Logged
skochan
Administrator
Hero Member
*****
Posts: 3114



« Reply #4 on: July 17, 2009, 11:25:12 PM »

That's a good question.  There are some scripts out there that will make a copy of a project under a different name.  You can also duplicate the entire project folder in the Finder, but all the file names will be the same in the duplicated folder.     

Cheers,

Steve Kochan
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents ゥ 2009 classroomM.com. All rights reserved.