הדפסת צבע ב-COUT

  • פותח הנושא ec4
  • פורסם בתאריך

ec4

New member
הדפסת צבע ב-COUT

אני מתכנת ב- C++ ומעוניין לדדעת איך אני יכול להדפיס בצבעים שונים בפקודת COUT ? (אני מודע לכך שאני יכול להדפיס בצבע עם פקודות אחרת )
 

zagzagzag

New member
אני חושב שאי אפשר

כי הדפסה בצבע היא פעולה שלא קיימת בכל טרמינל.
 
באיזה פקודות אחרות

אפשר לכתוב צבעוני
 

annefan

New member
איזה יופי!

אני מתכוון לדרך המימוש שניתנה בסטנדרט:
New iostream manipulators are easy to implement because the most important part has already been done by the standardization committee when they included the basic_ostream& operator<<( basic_ostream& (*pf)(basic_ostream&)); overload in the standard. Thus, any function with the correct signature can be used as a stream manipulator:​
נקי ואלגנטי.
 
למעלה