473,406 Members | 2,894 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,406 software developers and data experts.

Looking for the EOF character on Windows XP using Visual C++ 6.0

Sid
Hi,

I am trying to run this simple C++ code. I am stuck at the DOS prompt
after entering in text as the normal commands like Ctrl-Z or Ctrl-D
used for EOL don't seem to work. I am using Microsoft Visual C++
compiler 6.0 on Windows XP. Any help would be greatly appreciated

#include <string>
#include <vector>
#include <iostream>

using namespace std ;
int main()
{
vector< string> svec;
svec.reserve(1024);

string text_word;

while (cin >> text_word)
svec.push_back(text_word);
svec.resize(svec.size() + svec.size()/2);

cout << "words read are: \n";

for (vector<string>::iterator it =svec.begin(); it !=svec.end(); ++it
)
cout << *it << ' ';
cout << endl;
return 0;

}
Jul 19 '05 #1
1 5179
WW
Sid wrote:
Hi,

I am trying to run this simple C++ code. I am stuck at the DOS prompt
after entering in text as the normal commands like Ctrl-Z or Ctrl-D
used for EOL don't seem to work. I am using Microsoft Visual C++
compiler 6.0 on Windows XP. Any help would be greatly appreciated


<OT>
You need to press enter at least once after all the words are read. And
then CTRL-D. It might be needed to press enter after that, too. I cannot
remember.
</OT>

--
WW aka Attila
Jul 19 '05 #2

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

Similar topics

4
by: trusst_3 | last post by:
Hi, Does anyone know how to display this entity in HTML.  but i need it to be filled with black and not empty. Basically it is a black square bullet. (I dont know why its not showing up...
3
by: Steve | last post by:
Hi, I'm currently looking a porting our Windows Codewarrior based C++ projects to MinGW and/or Visual Studio and I'm just wondering if there is a 'standard' suite of benchmark programs I can...
0
by: Dr. Zharkov | last post by:
To see character of Microsoft Agent in Visual Basic .NET 2003, we create the project: File, New, Project, Visual Basic Project, Windows Application. In Form1 we place two controls: Button and...
0
by: Dr. Zharkov | last post by:
To see character of Microsoft Agent in Visual Basic .NET 2003, we create the project: File, New, Project, Visual Basic Project, Windows Application. In Form1 we place two controls: Button and...
1
by: Dr. Zharkov | last post by:
Hello. In project on Visual Basic .NET 2003 (File, New, Project, Visual Basic Project, Windows Application) after occurrence of Genie of Microsoft Agent and pressing of key Scroll Lock below Genie...
18
by: james | last post by:
Hi, I am loading a CSV file ( Comma Seperated Value) into a Richtext box. I have a routine that splits the data up when it hits the "," and then copies the results into a listbox. The data also...
37
by: Zhiv Kurilka | last post by:
Hi, I have a text file with following content: "((^)|(.* +))§§§§§§§§" if I read it with: k=System.IO.StreamReader( "file.txt",System.Text.Encoding.ASCII); k.readtotheend()
17
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, Wide character and multi-byte character are two popular encoding schemes on Windows. And wide character is using unicode encoding scheme. But each time I feel confused when...
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
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...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.