Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 17th, 2006, 12:04 PM   #11
Nickyj1211
Newbie
 
Join Date: Apr 2006
Posts: 15
Rep Power: 0 Nickyj1211 is on a distinguished road
Quote:
Originally Posted by nnxion
Nicky you _really_ need to listen to DaWei. conio.h is not portable, we could give you code for *nix with the curses library, or some code for you Playstation Portable, but it's not going to be portable. Comprende?
You might also like to search the forums, this question has been asked multiple times and some semi portable solutions have been provided.
Oh im sorry, like i said b4, im new... I get what you mean now.. You mean that if i just compiled and built the executable ... it wouldnt just run on all comps and applications, right? Why is that, cause the conio library isnt included with all consoles? This is my first language... and i understand what i have learned in my college programming class, but they havent covered portability. And sorry for asking newbie questions.
Nickyj1211 is offline   Reply With Quote
Old Apr 17th, 2006, 12:45 PM   #12
Prm753
Professional Programmer
 
Prm753's Avatar
 
Join Date: Oct 2005
Location: United States
Posts: 447
Rep Power: 4 Prm753 is on a distinguished road
Send a message via AIM to Prm753 Send a message via MSN to Prm753
Because, from what I understand, conio.h (which is a borland file, doesn't even work for me in Dev-C++) is not included with Linux. You would need to use the appropriate header file for Linux to get clrscr() compatible with Linux.

Newbie questions are just fine, as long as you put a little research into your question (or answer for that matter)
__________________
The world's first athletic computer geek!
The home of PrProgramsStudios
How not to post a question: <-- Please don't reply
Prm753 is offline   Reply With Quote
Old Apr 17th, 2006, 3:27 PM   #13
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Dev-Cpp has a (somewhat raped) conio.h. Woiks fine here. Except on my Braille output device, of course. Normally, I just use the console IO from Windows for my non-portable stuff. Hell to have to write 5 lines of code to clear the screen, but what can I say?
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Apr 18th, 2006, 1:17 AM   #14
bl00dninja
Programming Guru
 
bl00dninja's Avatar
 
Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 6 bl00dninja is on a distinguished road
i believe (i may be wrong) that conio.h has been deprecated. it's good to get in the habit now of writing portable code. what dawei is saying is that it may work on your computer in your development environment and all that happy shit, but may have weird results on other systems (like crashing). it's like telling someone on a rotary phone to "hit *67" to call back, it's not portable. in college even this may come back to bite you in the ass if whomever is grading your stuff is running on a non-compliant system. even worse in the professional environment.
__________________
i put on my robe and wizard hat...

Have you ever heard of Plato, Aristotle, Socrates?...Morons.
bl00dninja is offline   Reply With Quote
Old Apr 19th, 2006, 2:05 PM   #15
Nickyj1211
Newbie
 
Join Date: Apr 2006
Posts: 15
Rep Power: 0 Nickyj1211 is on a distinguished road
how is one to know what is portable and what isnt? is that something you are taught, or something you just figure out with use of programs? i mean, i think its kinda ridiculous and a waste of time to make large programs that you are unsure of there running capabilities...
Nickyj1211 is offline   Reply With Quote
Old Apr 19th, 2006, 4:45 PM   #16
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
There is a thing called the standard library. THAT is what is portable. Sometimes you don't want/need portable. That's fine too, in that case it helps to mention what OS and system you want your code for.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Old Apr 19th, 2006, 6:19 PM   #17
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Quote:
i mean, i think its kinda ridiculous and a waste of time to make large programs that you are unsure of there running capabilities
Almost nothing that actually DOES anything, beyond calculate, is portable. Different systems have differing input devices and differing output devices. Shit fahr, man, keypads and keyboards aren't even the same. Look at your calculator keyboard up'side your telephone keypad. Breathe deeply and pump some actual oxygen into your braincells, sit on the corral fence for five minutes, and work 'em.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:47 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC