Prompting a user with an input box? [C++]

后端 未结 8 868
遥遥无期
遥遥无期 2020-12-11 15:17

My goal is to simply use a pop-up box to ask the user for an input. I\'ve searched around quite a bit and pretty much all the results say that creating a messageBox is reall

8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-11 15:54

    I have to admit that I haven't really done much in the way of input boxes in ages, but you basically have to go outside C++ in order to get any kind of graphical input box. There's simply no mechanism built into the language for that kind of stuff for portability reasons. I don't remember if it applied to C++ as well, but C doesn't even assume you have a console. Anyway, your best bet would be something along the lines you were already trying: Win32 API, Qt, etc. If you can use the console, however, feel free to just use the iostream library to get the job done.

提交回复
热议问题