Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Ausgabe in Kommandozeile bei Win32 Project

Empfohlene Antworten

Veröffentlicht

Hallo,

ich schreibe grad in c++ ein Programm, das ein Win32 Project ist, da es ursprünglich nicht kommandozeilenbasiert sein soll. Wie mache ich es jetzt, wenn mein Programm von der Konsole aus gestartet wird, dass ich in der Konsole aus der es gestartet wurde etwas ausgeben kann?

Ich dachte da so an printf und so, aber das funktioniert nicht...

Hab auch schon im Internet gesucht, aber irgendwie nix gefunden. Vielleicht steh ich auch einfach nur auf dem schlauch.

Vielleicht kann mir ja jemand von euch weiterhelfen.

Mfg,

Reality

Ab Windows XP kannst du dich mit AttachConsole( ATTACH_PARENT_PROCESS ) an die Konsole des Parent-Prozesses hängen. Dann kannst du mit WriteFile oder den Konsolenfunktionen darauf schreiben.

Wenn du ganz normal printf/cout benutzen willst, könnte dieser Artikel für dich interessant sein:

Writing to and read from console - From a GUI Application using the same cout/cin and printf/scanf - The Code Project - C++ / MFC

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.