473,387 Members | 1,812 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,387 software developers and data experts.

c++ help needed

Well in bloodshed c++ i am able to run the following program :
Code:
#include <iostream.h>
using namespace std;

int main()
{
cout << "Hello World!" << endl;
cout << "Press any key to continue." << endl;
cin.get();
return 0;
}


I am using the .h extension which don't support namespaces and still
able to run it .
what the hell ?

Also Code:
#include <iostream.h>
#include<string.h //how can i use that ?
using namespace std; //with this ?

int main()
{
cout << "Hello World!" << endl;
cout << "Press any key to continue." << endl;
cin.get();
return 0;
}

Jun 18 '07 #1
4 1265
<ak**********@gmail.comwrote in message
news:11*********************@q19g2000prn.googlegro ups.com...
Well in bloodshed c++ i am able to run the following program :
Code:
#include <iostream.h>
using namespace std;

int main()
{
cout << "Hello World!" << endl;
cout << "Press any key to continue." << endl;
cin.get();
return 0;
}


I am using the .h extension which don't support namespaces and still
able to run it .
what the hell ?

Also Code:
#include <iostream.h>
should be <iostreambut I guess bloodshed has this old one kicking aroiund
that may be pre-standard, not sure.
#include<string.h //how can i use that ?
This is the old C header for c-style strings. strcpy, strcmp, etc...
<cstringis the std namespace version of it.
<stringis the one for std::string.

Try to actually create a std::string in your program and you should get an
error becuase std::string is not defined.
using namespace std; //with this ?

int main()
{
cout << "Hello World!" << endl;
cout << "Press any key to continue." << endl;
cin.get();
return 0;
}

Jun 18 '07 #2

Jim Langston wrote in message...
<ak**********@gmail.comwrote in message...
Well in bloodshed c++ i am able to run the following program :
Code:
#include <iostream.h>

I am using the .h extension which don't support namespaces and still
able to run it . what the hell ?

Also Code:
#include <iostream.h>

should be <iostreambut I guess bloodshed has this old one kicking
aroiund
that may be pre-standard, not sure.
Not 'bloodshed' (Dev-C++ IDE), it's GCC(MinGW):

<root>\Dev-Cpp\include\c++\3.3.1\backward\iostream.h.

Seems like that should never have been there after the 2.95 series, IMHO.

[ note to self: upgrade that poor old (3.3.1) puppie!! <G]
--
Bob R
POVrookie
Jun 18 '07 #3
On Jun 18, 10:56 pm, "BobR" <removeBadB...@worldnet.att.netwrote:
Jim Langston wrote in message...
<akshaycjo...@gmail.comwrote in message...
Well in bloodshed c++ i am able to run the following program :
Code:
#include <iostream.h>
I am using the .h extension which don't support namespaces and still
able to run it . what the hell ?
Also Code:
#include <iostream.h>
should be <iostreambut I guess bloodshed has this old one kicking
aroiund
that may be pre-standard, not sure.

Not 'bloodshed' (Dev-C++ IDE), it's GCC(MinGW):

<root>\Dev-Cpp\include\c++\3.3.1\backward\iostream.h.

Seems like that should never have been there after the 2.95 series, IMHO.

[ note to self: upgrade that poor old (3.3.1) puppie!! <G]
--
Bob R
POVrookie
But how to update ???
Can u end me the link ?

Jun 19 '07 #4

<ak**********@gmail.comwrote in message ...
On Jun 18, 10:56 pm, "BobR" wrote:
Jim Langston wrote in message...
should be <iostreambut I guess bloodshed has this old one kicking
aroiund that may be pre-standard, not sure.
Not 'bloodshed' (Dev-C++ IDE), it's GCC(MinGW):
<root>\Dev-Cpp\include\c++\3.3.1\backward\iostream.h.

But how to update ???
Can u end me the link ?
If you have the latest from Bloodshed, just use <iostream>, like Jim said.
Dev-C++ IDE: http://www.bloodshed.net/

If you want to check for newer compiler version:
MinGW (GNU compiler): http://www.mingw.org/

--
Bob R
POVrookie
- - other IDEs
MinGWStudio http://www.parinyasoft.com/
Code::Blocks http://www.codeblocks.org/
Jun 19 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: System | last post by:
Hello All, Redhat 9.0 Mysql 3.23.56 ==> Running I want to upgarde to 4.0.13 but this is the error it says: # rpm -Uvh MySQL-server-4.0.13-0.i386.rpm warning: MySQL-server-4.0.13-0.i386.rpm: V3...
8
by: Stephen | last post by:
I am trying to add some code to below to include a datatable and fill the datatable. The reason for doing this is so as I can check to see whether there are any rows returned by the stored...
13
by: Joe Feldman | last post by:
This position is located in the South Bay Area in Northern California. If you are interested please send me your resume in a word .doc so that I can review it. If this does not look like a match,...
0
by: Cindy B | last post by:
Please send your resume and position to Cindy@AtlanticResource.com! I CAN NOT accept candidates that ARE OUTSIDE OF THE US! NO PHONE CALLS PLEASE! Email your resume to me! Position:SQL...
3
by: Wade | last post by:
I would like to install the .Net 1.1 framework on a Web Server running W2K to be able to run ASP.NET files, but I'm not sure where to find the files I need for the .Net framework. I have ".NET...
17
by: dingoatemydonut | last post by:
The C99 standard states: "In the abstract machine, all expressions are evaluated as specified by the semantics. An actual implementation need not evaluate part of an expression if it can deduce...
5
by: Steve | last post by:
Hi, I am sitting down to design our next set of internal apps. I would like to approach this in a way that would allow me to break logical parts of the application that handle specific tasks...
0
by: ultradiv | last post by:
I have a VB.NET application partly built that produces an xml output (just a file at present) I have a .NET webserver and SQLserver 2000 I need to be able to send the xml to the webserver/database...
28
by: Ian Davies | last post by:
Hello I would appreciate some help from someone who has knowledge of working with css, php javascript and how they interact. Ive been working on a task for the last few days and have started to...
37
by: C_guy | last post by:
Does anyone know of a (hopefully free) tool that can traverse a project and determine which "#include"s are not needed or needed in every .C file? This would be helpful in removing header...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.