Answered by Micko 2 in a post from 16 Years Ago. Well, in that case it would be nice to post your solution Answered by Ancient Dragon 5, in a post from 14 Years Ago. They are not necessary there. Read the following Looks like you're comparing chars instead of c-style strings. Welcome to the forum, Akshay1. WaltP commented: To do what, exactly? Show people a bad way to program?
If so, then yes, this is one way to write bad and dangerous code. Facebook Like. Twitter Tweet. Be a part of the DaniWeb community. Sign Up — It's Free! Reply to this Topic. This topic is old! No one has contributed to this discussion in over 7 years. Are you sure you have something valuable to add to revive the existing conversation? Google Green Messages. Use Your iPhone as a Webcam. Hide Private Photos on iPhone. All Microsoft's PowerToys for Windows. Take Screenshot by Tapping Back of iPhone.
Windows 11 Default Browser. Browse All Windows Articles. Windows 10 Annual Updates. OneDrive Windows 7 and 8. Copy and Paste Between Android and Windows.
Protect Windows 10 From Internet Explorer. Mozilla Fights Double Standard. Connect to a Hidden Wi-Fi Network. Change the Size of the Touch Keyboard. Reader Favorites Take Screenshot on Windows. Mount an ISO image in Windows. Boot Into Safe Mode. Where to Download Windows Legally. Find Your Lost Product Keys. Clean Install Windows 10 the Easy Way. Just use a counter variable to keep track of the current line number.
Each time you call getline you If an error occurs while reading eof will not be set, so you have an infinite loop. If eof is set you will still exit the loop, but you will also exit if, for example, bad is set, someone deletes the file while you are reading it, etc. A modified version of the accepted answer. And 0 in find should be unnecessary because find by default searches the whole string. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 9 years, 4 months ago. Active 8 years, 7 months ago.
0コメント