LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 09-04-2003, 07:26 PM   #1
muneebs123
LQ Newbie
 
Registered: Sep 2003
Posts: 23

Rep: Reputation: 15
magic numbers problem


i used to work on red hat linux 7.2 in c++. There was no error as to what ever was the file name or extension was..........
now i am using mandrake linux ..... now if the file has some different extension than .c/.cpp then the error that file format is not recognized comes out. I wanted to ask isnt that the magic number that decides the file type.......please comment on that waiting anxiously7
 
Old 09-04-2003, 07:32 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,813
Blog Entries: 54

Rep: Reputation: 2987Reputation: 2987Reputation: 2987Reputation: 2987Reputation: 2987Reputation: 2987Reputation: 2987Reputation: 2987Reputation: 2987Reputation: 2987Reputation: 2987
You're triple posting. Please don't.
 
Old 09-05-2003, 02:33 PM   #3
jinksys
Member
 
Registered: Aug 2003
Location: 63123
Distribution: OpenSuSE/Ubuntu
Posts: 418

Rep: Reputation: 31
Magic numbers are only used with binary files. C/C++ source files are text documents, so they are identified with their extention.

This URL might be handy...
http://www.pcquest.com/content/linux.../199060101.asp
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filesystem Magic numbers? where are they defined? NiallC Linux - General 3 02-07-2005 12:42 AM
c++ prime numbers loop problem muddlnx Programming 6 08-31-2004 11:14 PM
Characterset problem?: little boxes with numbers alienDog Slackware 4 05-08-2004 08:36 PM
Adding numbers, break on non-numbers... Cruger Programming 1 03-22-2004 10:18 AM
magic numbers muneebs123 Mandriva 1 09-04-2003 07:31 PM


All times are GMT -5. The time now is 06:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration