Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
getline
- Page 1
Re: Getline() for string delimitation
Programming
Software Development
14 Years Ago
by Radical Edward
…"; } std::string arquivo_linha, arq_linha_part; while (
getline
(arquivo, arquivo_linha)) { if (arquivo_linha[0] != …'#') { std::istringstream token(arquivo_linha); while(std::
getline
(token, arq_linha_part, ':')) { std::cout << …
Re: Getline causing SIGSEGV
Programming
Software Development
15 Years Ago
by Dave Sinkula
getline
is not standard C.
Getline help!
Programming
Software Development
19 Years Ago
by mybrainhurts
… while(!fin.
getline
(name, 30, '|').eof()) { fin.
getline
(jersey_number, 10, '|'); fin.
getline
(best_time, 10); fin.
getline
(sport, 40, '|'); fin.
getline
(high_school, 40…char marks[30]; while(!fin.
getline
(name, 30, '\n').eof()) { fin.
getline
(fullName, 30, '\n'); fin.
getline
(marks, 30, '\n');…
Re: GetLine()
Programming
Software Development
14 Years Ago
by Narue
…] cout << "enter 5 letter";
getline
(cin, letter); [/CODE] executes fine but when running PC… (Warning -- Ignoring return value of function 'std::
getline
(std::basic_istream<char,std::char_traits<char>&…] cout << "enter 5 letter"; if (!
getline
(cin, letter)) { // Handle the error } [/code] Which…
Re: Getline help!
Programming
Software Development
19 Years Ago
by mybrainhurts
… an array do i have to do something different than
getline
? Here is what i have: [CODE]#include <iostream.h…"; } fout.open(OFname); fin.open(IFname); while(
getline
(fin, fullName) &&
getline
(fin, marks)) { fout << fullName <<…
Re: GetLine()
Programming
Software Development
14 Years Ago
by Greywolf333
… why ? Thanks[/QUOTE] It gets a little convoluted...
getline
is a global function that mixes strings and streams together… lazy to make char arrays to use the stream.
getline
function. To answer your question, I hope... It… are other reasons why they do this, too. while(
getline
(filestream, stringname)) {} will probably return false at end …
GetLine()
Programming
Software Development
14 Years Ago
by elsiekins
…[CODE] cout << "enter 5 letter";
getline
(cin, letter); [/CODE] executes fine but when running PC- Lint…error 534: (Warning -- Ignoring return value of function 'std::
getline
(std::basic_istream<char,std::char_traits<char>>…wondering if anyone could tell me the problem with
getline
and is there an alternitve i do wish …
Re: GetLine()
Programming
Software Development
14 Years Ago
by pseudorandom21
I usually use std::
getline
, and yes it's true it returns the istream object. I commmonly do this: [code] string inputLine; while(
getline
(inFile,inputLine) ) { //... Process Line } [/code]
Getline
Programming
Software Development
14 Years Ago
by andimiami
…me in the right direction? I have to use
getline
. Its part of the assignment. Thanks!!! [CODE…; last; result = parse2(first,last); mylist.Insert(result);
getline
(data, oneline); // data >> first; } …
Re: Getline
Programming
Software Development
14 Years Ago
by Greywolf333
…me in the right direction? I have to use
getline
. Its part of the assignment. Thanks!!! [CODE…; last; result = parse2(first,last); mylist.Insert(result);
getline
(data, oneline); // data >> first; } …
Re: GetLine()
Programming
Software Development
14 Years Ago
by pseudorandom21
There is most likely a warning level you can set to have the compiler only display more critical warnings. [url]http://www.cplusplus.com/reference/string/
getline
/[/url]
Re: GetLine()
Programming
Software Development
14 Years Ago
by elsiekins
[QUOTE=pseudorandom21;1470233]There is most likely a warning level you can set to have the compiler only display more critical warnings. [url]http://www.cplusplus.com/reference/string/
getline
/[/url][/QUOTE] Any idea why it is actually bringing up this warning ? and why ? Thanks
Getline help
Programming
Software Development
16 Years Ago
by DemonGal711
…, int& end, string word[]) { int x = 0; string line;
getline
(file, line); while (line != '/n') { line >> word[x… that it doesn't code in the /n when using
getline
, but how do I get it to keep doing this…
Re: Getline help
Programming
Software Development
16 Years Ago
by Nick Evan
…; file, int* end, string word[]) { int x = 0; string line;
getline
(file, line); stringstream str(line); while (str >> word…& file, vector<string>* AllWords) { string line, word;
getline
(file, line); stringstream str(line); while (str >> word…
Getline help
Programming
Software Development
15 Years Ago
by xcarbonx
[CODE]
getline
(inFile, st[i].name) while (inFile){ inFile >> st[…;> st[i].eng101 >> st[i].hist201; i++;
getline
(inFile, st[i].name); [/CODE] The above code only reads…
Re: Getline
Programming
Software Development
14 Years Ago
by jonsca
On line 64, you are attempting to parse the data without having any data yet. Put your
getline
statement first (before your parsing statement), then put a statement to split your string in two (into first and last), and then finally call [icode] parse2() [/icode].
Re: Getline
Programming
Software Development
14 Years Ago
by andimiami
Ooooh, ok. I'll try that. I was just going by where my instructor stuck the
getline
. He probably didn't notice that or mean for me to take him so literally. Haha. Makes sense.
Re: Getline
Programming
Software Development
14 Years Ago
by andimiami
…& mylist) { string oneline; string first, last, result; while (data) {
getline
(data, oneline); result = parse2(first,last); mylist.Insert(result…
Re: getline
Programming
Software Development
15 Years Ago
by Tom Gunn
The
getline
() method works with char pointers, and the non-method
getline
() works with string objects.
getline
Programming
Software Development
15 Years Ago
by SerenaG
I am a beginner at programming and dont understand the difference between get.cin( ) and
getline
('\n') ???
Getline() for string delimitation
Programming
Software Development
14 Years Ago
by fernandofranca
… std::string token,arq_linha_part; char arquivo_linha[255]; while(arquivo) { arquivo.
getline
(arquivo_linha,255); if (arquivo_linha[0] != 35) { token = arquivo_linha; while(… : error C2780: 'std::basic_istream<_Elem,_Traits> &std::
getline
(std::basic_istream<_Elem,_Traits> &,std::basic_string<…
getline error
Programming
Software Development
13 Years Ago
by MugANDGlass
…= new book; // file1.
getline
(id,12);
getline
(file1,title);
getline
(file1,author);
getline
(file1,year); file1.
getline
(price); //copy values from… while (!file1.eof()) {
getline
(file1,id);
getline
(file1,title);
getline
(file1,author);
getline
(file1,year);
getline
(file1,price); cout <<…
Re: getline error
Programming
Software Development
13 Years Ago
by Lerner
… and price are declared as type int and float but
getline
() can only be used with C style strings or STL… happen because of the difference between how >> and
getline
() handle the terminating char. This bug only happens if you… combine >> and
getline
() in the same program, call >> sometime in the…
getline(), not working properly
Programming
Software Development
13 Years Ago
by jcAmats
…this? this is the code segment with the
getline
() in my easy function.. [CODE]cout &…lt;< "\n\nPLAYER 1 Answer: ";
getline
(cin, easyAnswerPlayer1); // i declared this as a … cout << "PLAYER 2 Answer: ";
getline
(cin, easyAnswerPlayer2); // and also this replace(easyAnswerPlayer2.begin(), …
Re: getline is being skipped
Programming
Software Development
16 Years Ago
by Lerner
…into problems if you mix input methods (>> and
getline
for example) within the same program. For example, >…Hence, since the first char in the input buffer when
getline
() is called is the leftover newline char from >… before it, no information is put into authroname. (BTW,
getline
() does remove the terminating char (if any is found) from…
getline function
Programming
Software Development
15 Years Ago
by gokhanxyz
…first string:"; string first_string;
getline
(cin,first_string); cout<<"… string:"; string first_string;
getline
(cin,first_string);
getline
(cin,first_string); cout<<… string:"; string second_string;
getline
(cin,second_string);
getline
(cin,second_string);[/CODE] however, …
getline error
Programming
Software Development
15 Years Ago
by Grn Xtrm
…code] [Linker error] undefined reference to `
getline
' ld returned 1 exit status [/code]… /*********** code that gives problem ***********/ int counter = 0; while (
getline
(&filename, &line, stdin) ) { ++counter; printf( … several varaitions using different parameters for
getline
but all resulted in the aformentioned…
Re: getline error
Programming
Software Development
15 Years Ago
by gerard4143
…code] [Linker error] undefined reference to `
getline
' ld returned 1 exit status [/code]… /*********** code that gives problem ***********/ int counter = 0; while (
getline
(&filename, &line, stdin) ) { ++counter; printf( … several varaitions using different parameters for
getline
but all resulted in the aformentioned…
Re: getline() problem
Programming
Software Development
14 Years Ago
by NathanOliver
…cin.ignore(80, '\n'); // need this here for
getline
to work
getline
(cin. somethingelse); // without a cin >> …you don't need anything
getline
(cin, something);
getline
(cin, somethingelse);
getline
(cin, bar); // no ignore here since… the newline in the input buffer where [icode]
getline
(cin, foo)[/icode] will extract the newline from…
getline function
Programming
Software Development
14 Years Ago
by mitrious
… class (named Str) and I was implementing the
getline
fucntion of the
getline
function that's what I got [CODE]void…spaces) [CODE] vector<string> v; string test; while(
getline
(cin, test)){ v = split(test); copy(v.begin(), v.end… etc etc etc. When I use my Str version of
getline
I press enter and it just adds the words to…
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC