Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Recource files

 
Post new topic   Reply to topic Printable version
 View previous topic  % sings while obtaining information Post :: Post awkward build error.  View next topic  
Author Message
tcsoccerman
Server Help Squatter


Age:31
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Fri Feb 23, 2007 5:05 pm    Post subject: Recource files Reply to topic Reply with quote

I can't seem to find a tutorail to use recource file's in c. Url. Or if you're cool enough to answer another one of my beginer's questions, go ahead.
ty.

Reason: For my spanish translator. wanna have a recourse file that is basically a database for all the translations i have.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Sat Feb 24, 2007 6:09 am    Post subject: Reply to topic Reply with quote

What do you think a resource file is?
_________________
ss news
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
tcsoccerman
Server Help Squatter


Age:31
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Sat Feb 24, 2007 11:35 am    Post subject: Reply to topic Reply with quote

Probably wrong: A file that i want so that my main.cpp isn't so big. one for verbs, nouns, spanish rules, greetings. All of these i can make functions in and refer to it in main.cpp. that's what i want, probably not right though.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Bak
?ls -s
0 in


Age:24
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Sat Feb 24, 2007 11:47 am    Post subject: Reply to topic Reply with quote

if you're clever you can do it using arrays
_________________
SubSpace Discretion: A Third Generation SubSpace Client
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Cyan~Fire
I'll count you!
I'll count you!


Age:36
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Sat Feb 24, 2007 1:18 pm    Post subject: Reply to topic Reply with quote

The thing is that resource files are Windows-specific, so using them automatically makes your source code non-portable. Arrays would be the way to go, and they'll probably be easier, too.
_________________
This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:40
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3614
Location: Las Vegas
Offline

PostPosted: Sat Feb 24, 2007 2:30 pm    Post subject: Reply to topic Reply with quote

If you think about this from a programmer's perspective, you'll see that the English to Spanish translations are not really part of the program. It is a backend database tool that can be independent of the program.

A better way to go about this is to have the words be in a separate file and load that at runtime. Based upon your previous code postings, I'd say that this is a bit beyond you at this time. Have you looked into maybe trying a language with more of a universal library, such as maybe python? Python's language structure is more suited to novices than C is, with a nice extensive library of functions that you can use instead of having to write you own.
Back to top
View users profile Send private message Add User to Ignore List Send email
tcsoccerman
Server Help Squatter


Age:31
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Sat Feb 24, 2007 5:24 pm    Post subject: Reply to topic Reply with quote

I'm looking into python. This may sound funny, but i'm looking into computer programming as a job so i'm trying to learn c first. (don't worry, i'm still only 14). but as you said:

Quote:
Based upon your previous code postings, I'd say that this is a bit beyond you at this time. Have you looked into maybe trying a language with more of a universal library, such as maybe python? Python's language structure is more suited to novices than C is.....


which makes sense to learn easier languages and move up, not starting big. kinda like a stick shift, start low go up. ty.

Back to My question:

Quote:
A better way to go about this is to have the words be in a separate file and load that at runtime.


That's exactly what i wanted to do, but i didn't know if there were special commands required to use a function from another file. (and i obviously thought it was called a recourse file). thanks again.

@MGB: not at all offended by you calling me novice, it's like a genious calling me stupid.

P.S.:I'm going to get a book to refer to tomorrow so i don't have to bug you guys.(and my dad hates computers which is my source for learning code right now)
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Animate Dreams
Gotta buy them all!
(Consumer whore)


Age:36
Gender:Gender:Male
Joined: May 01 2004
Posts: 821
Location: Middle Tennessee
Offline

PostPosted: Sun Feb 25, 2007 4:14 am    Post subject: Reply to topic Reply with quote

Well, starting at 14 is certainly the way to go. As far as books, I would kind of like to suggest checking out Sam's Teach Yourself C++ In 21 Days. It was pretty easy to read, even with no programming experience. You'll only learn syntax and stuff, and very little of actual programming and problem solving, but it's a good introduction that won't scare you away from programming.

Anyway, in this one particular case, since all he wants is a smaller .cpp file, wouldn't the best solution(in this one case) be to put that stuff in a header file? I mean, sure, MGB's database solution is almost assuredly the best one, but the TC is probably just doing this to learn, and if all he wants is a smaller .cpp file... I don't know, it just seems like someone would've mentioned it by now. Or maybe you guys were just assuming that's where he'd put them?

soccerman, I'm assuming you know about header files, but since you're new, I guess it's possible you don't. In case you don't, you can put code into a file, and you can call it something like verbs.h, and then type #include "verbs.h" in your main.cpp, and it will include all of those definitions in your file. It probably would be better to read in the words from a separate file, but this is a bit harder to manage programming wise than just putting the words in a header file. Besides, you won't be able to read in data from a text file without causing a debate as to whether stdio or iostream was better.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address MSN Messenger
tcsoccerman
Server Help Squatter


Age:31
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Sun Feb 25, 2007 8:44 am    Post subject: Reply to topic Reply with quote

Yeh, i was reading up on headers a little bit. I actually got my program to work just by adding a recourse file to my project and it automatically linked for me(using dev c++). I can learn about manifest files later lol. I'll look into teach yourself book, but does it matter that that is for c++ and i'm learning c? thanks again

Carry on my wayward son!!! best song in the world
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Animate Dreams
Gotta buy them all!
(Consumer whore)


Age:36
Gender:Gender:Male
Joined: May 01 2004
Posts: 821
Location: Middle Tennessee
Offline

PostPosted: Sun Feb 25, 2007 3:38 pm    Post subject: Reply to topic Reply with quote

Well, they have a Teach Yourself C in 21 Days book as well. I can only hope it's as simple as the C++ book was. The more I learn about programming, the more I realize how much the C++ book left out, but... as long as you treat it as an introduction to the language and to programming syntax, you'll be fine. You should probably get the C one instead, though. If for no other reason, do it so you won't have to learn multiple virtual inheritance right off the bat. I'm assuming they'll teach you something more useful in place of that. I really don't think Inheritance should be taught before you even learn how to program, that's a bit ridiculous. But whatever. I haven't seen the C book, but considering it's the same company I imagine it's very similar to the C++ book, so I suppose I'd recommend the C one instead.

Also, There'll be peace when you are done.
But... why'd you randomly start singing that? I'll be singing it all day....
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address MSN Messenger
tcsoccerman
Server Help Squatter


Age:31
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Sun Feb 25, 2007 4:19 pm    Post subject: Reply to topic Reply with quote

Already bought it. looks good. i randomly started singing that song because i can. and i like it.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Mon Feb 26, 2007 3:38 pm    Post subject: Reply to topic Reply with quote

Animate Dreams wrote:
TC is probably just doing this to learn, and if all he wants is a smaller .cpp file... I don't know, it just seems like someone would've mentioned it by now.
I was going to mention it, but forgot to check the forums for a bit.

As for buying books, you can get them for free at libraries, and if they don't have it then it's usually a very small fee for them to get it (I did this with my local library for some Palm OS programming books). You can also find them online, but legally I don't know, plus sometimes reading paper is easier for the eyes than reading a screen.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
tcsoccerman
Server Help Squatter


Age:31
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Mon Feb 26, 2007 4:01 pm    Post subject: Reply to topic Reply with quote

Quote:
plus sometimes reading paper is easier for the eyes than reading a screen.


bingo

plus my dad doesn't like me on computers. i already bought a book though at borders so i could keep it and it's just easier. i had 25 dollar gift card from someone so no biggy.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Animate Dreams
Gotta buy them all!
(Consumer whore)


Age:36
Gender:Gender:Male
Joined: May 01 2004
Posts: 821
Location: Middle Tennessee
Offline

PostPosted: Mon Feb 26, 2007 9:25 pm    Post subject: Reply to topic Reply with quote

I MUCH prefer reading books on paper. Besides, I spend enough time staring at a screen as it is. And since I refuse to use anything but CRT, it can get to my eyes. Besides, you can let people borrow books, and read them during class. Some of my classes are so pointless because I already know all the material, so I read instead. Which reminds me, I have a Java assignment due in a couple hours.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address MSN Messenger
Cyan~Fire
I'll count you!
I'll count you!


Age:36
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Tue Feb 27, 2007 10:42 am    Post subject: Reply to topic Reply with quote

Animate wrote:
And since I refuse to use anything but CRT, it can get to my eyes.

This doesn't make any sense...
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
D1st0rt
Miss Directed Wannabe


Age:36
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Tue Feb 27, 2007 5:36 pm    Post subject: Reply to topic Reply with quote

Cathode Ray Tube
_________________

Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Cyan~Fire
I'll count you!
I'll count you!


Age:36
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Wed Feb 28, 2007 11:31 am    Post subject: Reply to topic Reply with quote

I know what a Cathode Ray Tube is, I just don't understand why he would refuse to use anything but one and then complain about them hurting his eyes.

On another note, I finally got good-looking fonts in Linux! You just need to install Windows fonts, the ones that come with Linux by and large suck. icon_razz.gif

Windows fonts for Linux
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Non-Subspace Related Coding All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 621 page(s) served in previous 5 minutes.

phpBB Created this page in 0.474725 seconds : 42 queries executed (91.0%): GZIP compression disabled