473,396 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

need both c and c++ output statements to work together in one program.

Expand|Select|Wrap|Line Numbers
  1.     printf("cout<< Enter Name\n");
  2.         fflush(stdin);
  3.         gets(FIRSTPLANE[i].NAME);
  4.  
  5.         fflush(stdin);
  6.         printf("cout<<Enter Address\n");
  7.         gets(FIRSTPLANE[i].ADDRESS);
  8.  
  9.         fflush(stdin);
  10.         printf("cout<<Enter Phone Number");
  11.         gets(FIRSTPLANE[i].PHONE);
  12.  
  13.         FIRSTPLANE[i].SEATNUM=i+1;
  14.  
  15.  
  16.  
  17. void MENU()
  18. {
  19.     cout<<" please enter 1 for Smoking First Class\n ";
  20.     cout<<" please enter 2 for Non-Smoking First Class\n ";
  21.     cout<<" please enter 3 for Smoking Economy Class\n ";
  22.     cout<<" please enter 4 for non-Smoking Economy Class\n ";
  23.     cout<<" please enter 5 to exit\n"; 
  24. }    
  25. //both header files are inserted
  26.  
Apr 6 '11 #1
1 1158
mac11
256 100+
if you compile with a c++ compiler you can use printf and cout in the same program as long as you include the right headers and use them in a sane fashion.

You simply can't do it at all if you want to compile with a c compiler though
Apr 6 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Fernando Rodriguez | last post by:
Hi, How can I save the output of an external program, called with os.system()?
2
by: Daniel Bickett | last post by:
Hello, I am writing an application using two event-driven libraries: wxPython, and twisted. The first problem I encountered in the program is the confliction between the two all-consuming...
2
by: Nathan Pinno | last post by:
Hi, Can anyone tell me if pygame and Tkinter can work together in the same application? I thought I'd better ask before trying it, since both use widgets. Thanks, Nathan Pinno --
0
by: NSD | last post by:
Which Oracle program to use for adminitration and book-keeping Hello there, I am new to Oracle and I need to know how I can insert my company's data (administration and book - keeping) into an...
21
by: asif929 | last post by:
I need immediate help in writing a function program. I have to write a program in functions and use array to store them. I am not familiar with functions and i tried to create it but i fails to...
4
by: oormilarev | last post by:
dear all, i need help with a C program which should read from a very large - maybe about 80 pages - data file of mixed data types which should be classified into groups . that is i have to create...
9
chunk1978
by: chunk1978 | last post by:
hey everyone, i've been trying to solve this problem for 2 days straight, with no end in sight. i would greatly appreciate anyone's help. EXPLANATION: There are 3 Select Menus. The 1st and...
4
by: shyamkumars | last post by:
Hi, I would like to know how can I make a daemon program in perl,say DP . The said program need to call a a program say A, which will to parse huge text file. The run time of A may vary say 5 to 6...
1
by: vikas718 | last post by:
I need help to write a program using Visual c++ with winSDK or with WS Script Desktop lock application : 1. basically do desktop lock on activation (includes Task manager lock, start...
1
by: ImortalSorrow | last post by:
Please I need urgent help with this program! Everything is working well except a part where i want to repeat the riddle if the answer isnt correct. here's the code..hope someone can help me! ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.