How to output to console window without iostream in c++? [closed] - c++

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm a beginner C++ programmer.I would like to know that Is it possible to output to console windows without using iostream header file?
the answer of the question is actually Yes ! but How?

You can always delve down to the C library level, using e.g. printf.
If you don't want to use the standard library at all then you have to use platform-specific functionality. In Windows there are many layers here, much like the C++ versus C layers in the standard library. The highest Windows API layer is the WriteFile function, and below that, WriteConsole, then perhaps WriteConsoleOutput, so on, check it out.
Note that there are at least two open source projects to provide more reasonable console functionality in Windows, namely Console2 at SourceForge and mintty at Google Code.

Related

How do the cross-platform windows frameworks like Qt work? Are they wrappers around native API? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
Are QT/WxWidgets wrappers around respective native APIs' on linux, windows and Mac?
How are cross-platform windows framework built? How is cross-compiling done?
Thanks
Yes.
Sometimes they use lower level APIs to generate their own implementation of higher level APIs; like one that uses OpenGL to implement non-OS widget library. At other times they could adapt/reskin/modify OS widgets.
They are usually not cross-compiled. They just build and provide a similar API on multiple platforms, allowimg "client" code to compile with fewer changes on multiple platforms.

C++ for graphical software [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm in the process of learning C++ and was wondering about the graphical implications of C++.
I know Chrome was developed in C++, but I don't see how to replicate it or create any sort of GUI.
How is Chrome programmed for the UI?
C++ doesn't include any graphical library in it. So you need to use any existing third-party library or API of operating system.
For example, there exists next graphical libraries, which supports C++:
MFC
Qt
wxWidgets
TCL/Tk
GTK+
Some of them are object oriented and some - not. Some of them are portable, some - not. Some of them are proprietary, some - not.
Also you always can use low-level API's such as Win32 API

Programatically creating and compiling from a program in C++ [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Let's say we've got a first program called Program1.exe which contains the necessary information to create and compile another application called Program2.exe. Actually it could also load that information from a txt file or whatever.
Googling, I've found that this is "easy" to do in C#, using Visual Studio:
How to programatically build and compile another c# project from the current project
Programmatically Invoke the C# Compiler
The problem is that I'm not using (and can't use) C#, but C++. Summing it up, my question is if that I can do this same thing using C++.
I would prefer to do it without additional libraries, but if that's not possible, or if it's too hard to do, you can also recommend any library allowing it.
I think you'll probably have noticed it, but my goal is to use it under Windows so I don't care if it's not portable.
Thanks everybody.
It's trivial (if maybe a bit odd) for a C++ program to compile and run another based on code stored in a text file. Debugging that other program, however, isn't.

Runtime add algorithm to a program [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I'm creating a program that make some matrix analysis. Now i want to implement some basic algorithms but I need to allow users implement new algorithms in the future without recompile the code.
I suppose that these algorithms already exist, probably in c/c++ language.
How can I do it if I use qt?
Maybe it's better use an other programming language and why?
I suppose that these algorithms already exist, probably in c/c++ language
If that's so, one way would be to write your program capable of loading DLLs, and then your users can compile their own algorithm DLL plugins for your application.
Or if you don't expect your users to be able to compile the existing c/c++ algorithms, maybe you can do as Joachim Pileborg suggests, and add in a scripting interface.

C++ Command-Line program design UI? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I am given a task to develop an C++ command-line(terminal, I am using, will run the program in Linux/Ubuntu) display. But I dont like the command-line design, is there anyway to improve the UI design?
Note: I must run the program in terminal!!
ncurses. It's a lib to be able to put text wherever you want in the terminal, so you can effectively draw, ascii-art style in the terminal. It's also a very old library, so it may be a little tedious to use.
I developed a simple multiplatform console management library some time ago.
You can use it at least on Linux and Windows. It uses native calls in Windows, and standard escape codes in other platforms.
If you just want to show some colors, position the cursor, and so on, you can use it in a matter of minutes without struggling with ncurses.
The documentation (generated with doxygen) is included in the Zip file.