Hi everyone.
I am working with tables from the C ++ programming language. Whenever I want to write a record to a table that contains character fields consisting of several characters (in fact, strings), I come across the following routine. As you know, if a character field in the database consists, for example, of 10 characters, and the string "IBM" must be stored there, then the unoccupied 7 characters must be filled in with blanks. To do this, in addition to copying the string into the record structure, fill in the rest of the line with spaces.
Isn't there a way that would fill the unused part of the character field with blanks automatically when writing?
I am working with tables from the C ++ programming language. Whenever I want to write a record to a table that contains character fields consisting of several characters (in fact, strings), I come across the following routine. As you know, if a character field in the database consists, for example, of 10 characters, and the string "IBM" must be stored there, then the unoccupied 7 characters must be filled in with blanks. To do this, in addition to copying the string into the record structure, fill in the rest of the line with spaces.
Isn't there a way that would fill the unused part of the character field with blanks automatically when writing?
Comment