如何在我的编码中添加风味 [英] how to put flavour in my coding

查看:56
本文介绍了如何在我的编码中添加风味的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想让我的程序的介绍部分闪现方面
运行程序的欢迎部分中包含的信息.
我不知道是否可以做到,所以我问

I would like to have the introductory part of my program to flash aspect
of the information contained in the welcome part of my program when i run it.
I dont know if this can be done so am asking

{
    cout<< "\n********************************************************";
    cout<< "\n        WELCOME TO PROGRAM MATRIX";
    cout<< "\n********************************************************"<<endl;
    cout<< "\n This program was written by THE GANG OF THREE" << endl;
    cout<<"\n ";
    cout << " for:    Dr. T. Chambers" << endl << endl; 
    cout <<"\n Represents : Group Assignment for C++ 2011";
    cout<<"\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"<<endl;
    cout << "This program will solve a square linear system using Cramer's Rule." << endl;
    cout << "Ax = b, where :"<<endl;
    cout<<"\n               A is a square (n x n) coefficient matrix," << endl;
    cout <<"\n               x is a variable (n x 1) matrix, and."<<endl;
    cout<<"\n               b is a constant (n x 1) matrix." << endl;
    cout<<"\n"<<endl;

    return;
}

推荐答案

如果您要谈论的是文本的闪烁部分(即,使其闪烁),则没有直接的方法用于控制台应用程序.您可以通过用空格手动覆盖文本,然后在重新编写它并再次休眠之前先使其休眠来完成此操作,但这意味着该应用程序将对用户无响应.

坏主意-我不会打扰自己(但后来我讨厌启动画面).
If you are talking about blinking part of your text, (i.e. making it flash on and off) there is no direct way to do it for a console application. You can do it by manually overwriting the text with spaces, and sleeping before re-writing it and sleeping again, but that means that the application will become unresponsive to the user.

Bad idea - I wouldn''t bother myself (but then I hate splash screens).


您是认真的吗?

考虑一下:您正在打开控制台以转到目录,并可能重命名某些文件.现在,每次发出cd命令时,都会突然出现一个闪烁的屏幕,告诉您:
Are you serious?

Consider this: you''re opening the console to go to a directory and maybe rename some file. Now everytime you issue a cd command, a flashing screen suddenly appears, telling you:
********************************************************
        WELCOME TO PROGRAM CD
********************************************************
 This program was written by THE GANG OF ONE
 
 for:    Dr. I Diot


 Represents : Group Assignment for C / MSDOS 2.0 1983
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 This program will change your current directory with the syntax

  cd [directory], where :


               ''cd'' is the name of this command

               [directory] is the name of the directory you want to change to



好吧...您认为这很有趣会持续多久?从我为防止浏览器中出现各种令人眼花stuff乱的东西(并避免以这种方式我无法约束的网站)而竭尽全力,我可以告诉你我根本不会觉得这很有趣!

并且:这与您的作业有什么关系?

我的建议:如果您真的想尝试做这种事情,那就继续做吧.我相信有些不可打印的字符在打印时会产生这种效果. (至少以前可以在8位计算机上使用,这大约是我上次尝试这种操作的时间). 但是不要把它展示给您的教练,否则他会杀了您!



Well ... just how long would you consider this funny? Judging by the lengths I go to to prevent all kind of flashy annoying stuff in my browser (and avoiding sites that I cannot restrain in that way), I can tell you that I would not consider it funny at all!

And: what has this to do with your assignment?

My advice: If you really want to try out doing that kind of stuff, go ahead and do it. I believe there are nonprintable chars, that, when printed, create this kind of effect. (at least this used to work back in the time of 8 bit computers, which is about the last time I tried anything like that). But do not show it to your instructor, or he will kill you!


这篇关于如何在我的编码中添加风味的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆