Question
What source-file-name convention is best? foo.cpp? foo.C? foo.cc?

Answers

If you already have a convention, use it. If not, consult your compiler to see what the compiler expects. Typical answers are: .cpp, .C, .cc, or .cxx (naturally the .C extension assumes a case-sensitive file system to distinguish .C from .c).

We've often used .cpp for our C++ source files, and we have also used .C. In the latter case, when porting to case-insensitive file systems you need to tell the compiler to treat .c files as if they were C++ source files (e.g., -Tdp for IBM CSet++, -cpp for Zortech C++, -P for Borland C++, etc.).

The point is that none of these filename extensions are uniformly superior to the others. We generally use whichever technique is preferred by our customer (again, these issues are dominated by business considerations, not by technical considerations).   Your Comment




More Software Questions..
What is the inputsplit in map reduce software?

What is software configuration management?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?

What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?

Which oracle package is used to manage the oracle lock management services?

What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?

What is marker interface?

What types of partitioning are there for BW?



Search
Can you Answer!!
  • Q Unisys Universal Repository
  • Q Indian Army has developed which mobile app for soldiers to track promotions and postings?
  • Q Why do capital expenditures increase assets (pp&e), while other cash outflows, like paying salary, taxes, etc., do not create any asset, and instead instantly create an expense on the income statement that reduces equity via retained earnings?
  • Q Which inscriptions is being considered as the rst Sanskrit inscription in South India?
  • Q Find the output for the following C program #include void main(void); static int i=50; int print(int i); void main(void) { static int i=100; while(print(i)) { printf("%d ",i); i--; } } int print(int x) { static int i=2; return(i--); }
  • Q Explain about services in Angular.js ?
  • Q Which was first geostationary satellite launched in India?
  • Q Name the Chief Coach of Indian Hockey team, recently removed
  • Q What is the National winter sport of Canada?
  • Q Which wine grape variety is nicknamed The King of Grapes
  • Q 2015 Commonwealth Heads of Government Meeting will be held in:..