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

std::getline

sam
Hi,

How can I use getline ignore the commandline arguments?

Thanks
Sam
Jul 23 '05 #1
4 5724
sam wrote:
Hi,

How can I use getline ignore the commandline arguments?


Your question makes no sense. getline doesn't have to do anything with
command line arguments. And if you want to ignore the command line
arguments, just don't do anything with them.

Jul 23 '05 #2

"sam" <sam++@--.com> wrote in message news:d6***********@news.hgc.com.hk...
Hi,

How can I use getline ignore the commandline arguments?

Thanks
Sam


Try it in English.
Jul 23 '05 #3

"sam" <sam++@--.com> wrote in message news:d6***********@news.hgc.com.hk...
Hi,

How can I use getline ignore the commandline arguments?


No special action is needed in order to ignore
command-line arguments. Simply ignore them.
You can have your 'main()' function refuse
to 'admit' that any exist, by not declaring
any:

int main()

Or if you do declare them:

int main(int argc, char **argv)

You can still 'ignore' them by not referring to
them (however in this case some compilers might
issue a warning).

-Mike
Jul 23 '05 #4
Rolf Magnus wrote:
sam wrote:
How can I use getline ignore the commandline arguments?
Your question makes no sense. getline doesn't have to do anything

with command line arguments. And if you want to ignore the command line
arguments, just don't do anything with them.


Maybe she confuses getline and getopt.

Jul 23 '05 #5

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

Similar topics

5
by: Frank Schmitt | last post by:
Hi! I've just been bitten by the famous Windows newline issue, i.e. tried to read a textfile written by a windows application on an unix platform. When reading a line with ...
10
by: Skywise | last post by:
I keep getting the following error upon compiling: c:\c++ files\programs\stellardebug\unitcode.h(677) : error C2664: 'class istream &__thiscall istream::getline(char *,int,char)' : cannot convert...
7
by: Vladimir Lushnikov | last post by:
Hi, I have just started learning C++ and have been trying to do simple string manipulation. However, when calling this function: int helloString() { string name; cout << "Please enter...
18
by: Amadeus W. M. | last post by:
I'm trying to read a whole file as a single string, using the getline() function, as in the example below. I can't tell what I'm doing wrong. Tried g++ 3.2, 3.4 and 4.0. Thanks! #include...
2
by: jalkadir | last post by:
I am trying to get character string from the user, to do that I use getline(char_type*, streamsize), but I get a segmentation fault??!! Can anyone give me a hand, what am I doing wrong? --snip...
2
by: aGAric | last post by:
i use std::getling to read a line in unicoude file to buffer,like: WCHAR buf wifstream in; std::getling(buf,in,100); but i can't get the right result,it seems can only read by 1 byte;e.g first...
2
by: Bit Byter | last post by:
I have a method in a class implemented like this: int foo (const char* filename, bool flg) { FILE *fp; char *buffer, *tokstr, *tmp; size_t size, toksize; unsigned int i; if ((fp =...
1
by: Kevin Eller | last post by:
I haven't used std::getline for a long time, if someone can help me
6
by: JML | last post by:
Hi, I have some code which parses a text file and creates objects based on what is in the text file. The code works just fine on Windows, but when I compile it using XCode on OS X the parsing...
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
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.