Within the file you are using all data is binary. When the file data is read into your program, your program converts that data into whatever it's been told to convert it into based on what variable is going to hold the information in the program. To concatenate to variables you can use a variety of techniques based on what the variable types are. If the variable types are both null terminated strings you can use strcat() to combine them into a single string. If the variables are both instances of the STL string class you can use the + operator to concatenate them. If one variable is a null terminated string and the other is a numerical variable you can use ssprintf() to concatenate them. If one variable is an instance of the STL string class and the other is a numerical variable you can use an istringstream to concatenate them. And so on.
Lerner
Nearly a Posting Maven
2,382 posts since Jul 2005
Reputation Points: 739
Solved Threads: 396