Create a unique numeric code

조회 수: 6 (최근 30일)
João Carvalho
João Carvalho 2017년 11월 29일
편집: Stephen23 2017년 11월 29일
I have a notepad with the following format:
  • Column 1 - Code;
  • Column 2 - Username;
  • Column 3 - Password;
  • Column 4 - Name;
The objetive of my program is to add new users to the notepad.
So, how can I create a unique numeric code for the new user between 1 and 99 and add the new user to the list? The code must match the lowest available number in the list.
Thanks
  댓글 수: 1
Stephen23
Stephen23 2017년 11월 29일
편집: Stephen23 2017년 11월 29일
"I have a notepad..."
No, you have a text file.
Notepad is a Microsoft text editor, i.e. it is an application that runs on a computer. A text file is a kind of computer file containing text data.

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2017년 11월 29일
hint: textscan or fscanf with format
'%f%s%s%[^\n]'

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by