MyTechSupport.ca :: Your Computer Technical Resource Headquarters! MyTechSupport.ca :: Your Computer Technical Resource Headquarters!
HOME FORUMS RESOURCES & TOOLS ARTICLES ONLINE STORE ABOUT US
Computer Support Forums arrow Software Support arrow Programming Problems arrow Topic: C Programmers Help !
May 21, 2019, 03:42:25 AM
 

Home Forum Rules Help Search Mobile Version Login Register

Welcome, Guest. Please login or register.
Did you miss your activation email?
May 21, 2019, 03:42:25 AM

Login with username, password and session length
 
News
Help us help you! Help us help you by helping out! The more people know about us, the more help will be available. Click here to find out how...
  0 Members and 1 Guest are viewing this topic.
Pages: [1] Go Down Print
Author Topic: C Programmers Help !  (Read 2046 times)
merfik
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 3


Bookmark and Share

View Profile
« on: August 24, 2007, 04:36:09 PM »

Alright, here's the beef. I'm basically writing a program for a PIC18 microcontroller. There's just one problem, my main asm file, it compiles C into assembly and then turns it into bytecode, is too big to be loaded into memory. So I'm getting compiler errors telling me the section is too long. It's not a very high end microcontroller, but I'm still pretty surprised I hit its limit so fast.

My program has a copious amount of char arrays, size 17. I did some removal of the parts of the program concerning the char arrays. I then declared them before the main method. It didn't compile. When I removed them, it compiled.

I was thinking of splitting up some of the methods into another file. How do I do that ? How do I access said external methods from the class file containing the main method.

Alternatively, a simple way to fix this would be to tell me a way to store some char arrays in another file. I would also need to know how to access them using the main method file.

I was schooled in Java, so I'm not sure how to go about doing this in C. Normally I would make a constructor for an object in that external file. Make that keep all the arrays. Then use dot operators to access the variables I want from the new object.

I'm quite sure I surpassed the maximum size for one such C file. The microcontroller will definitely accept more C files, it has 2 MBs of program space.
Logged

Agivearrade
Newbie
*

Karma: +0/-0
Offline Offline

Gender: Male
Posts: 4


Bookmark and Share

View Profile
« Reply #1 on: December 20, 2009, 01:11:12 PM »

How can I do beeter with computer programming such as C. Im takingmy first class in computer science and I love the subject matter. I just have difficulty prgramming. How can I master computer programming?

Thank you in advance for your wonderful advice.
Logged
Pages: [1] Go Up Print 
 
Jump to:  

Powered by MySQL Powered by PHP

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS!

Disclaimer
This site is NOT responsible for any damage that the information on this site may cause to your system. Everything you try, whether inspired by the response given from this site or not, is entirely at your own risk. All product names and company names used herein are for identification purpose only and may be trademarks or registered trademarks of their respective owners. We are in no way affiliated or representing any of the companies on this site unless specified.
Back to Top
Stop Spam Harvesters, Join Project Honey Pot Fight Back Against Spammers! Get Firefox! Get Thunderbird! View Sylvain Amyots profile on LinkedIn
Back to Top
Google visited last this page April 08, 2019, 07:43:28 PM