- Upvotes Received
- 2
- Posts with Upvotes
- 1
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
3 Posted Topics
You should use std::getline to line by line from text file. For your issue, I create simple code to resolve your issue #pragma once #include <string> #include <fstream> #include <istream> #include <streambuf> #include <iostream> #include <sstream> namespace TestForm { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace …
You can't limit characters by using gets I create simple function to limits input string #include <Windows.h> #include <WinCon.h> #include <conio.h> #include <stdlib.h> void gotoxy(int x,int y); void gets_ex(char*, int max_chars); int main(int argc, char *argv[]) { char urname[10], surname[10], fullname[20]; start: system("COLOR 1c"); gotoxy(11,9); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),291); printf(" "); gotoxy(11,10); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),291); …
DateTime dt; DateTime.TryParseExact("2013063018", "yyyyMMddHH", CultureInfo.InvariantCulture, DateTimeStyles.None, out dt);
The End.
thanhvy