다소 황당한 질문 같습니다만, C에서 화면에 밑줄 글짜를 찍을

seongwon1의 이미지

안녕하세요?

조금 터무니 없는 질문 같아 죄송합니다만

C에서 화면에 밑줄 글짜를 찍을 수 있나요?

이게 혹 가능한지 궁금해서요.

그러니까 화면에서

Hello World!

이런식으로 출력이 가능한지 알고 싶습니다.

아마도 불가능할 것 같지만.. 그래도 실낱 같은 희망으로 질문드립니다.

남은 하루 재미나게 보내세요. ^^;

Prentice의 이미지

지금 사용하고 계신 웹브라우저도 아마 C로 만든 것일텐데요.. 밑줄 잘 되죠? ^^;

C에서 (관련 라이브러리를 잘 쓰신다면) 그런 식으로 출력이 가능할 것 같습니다.

"화면"이 아니라 "콘솔"에 대해 물으시는 것이였다면 curses, ncurses에 대해 검색해보세요.

버려진의 이미지

호환성 문제가 있지만 http://eyff.home.insightbb.com/programs/f_echo.c 이런 방법도 있구요.

moonzoo의 이미지

백문이 불여일견!

unix c기준으로 간단한 소스임다.

#include <curses.h>
#include <stdio.h>


int main()
{
    int x;
    int y;

    initscr();
    attron(A_UNDERLINE);

    x = 5; y =10;
    mvprintw(y,x,"this is test");

    attroff(A_UNDERLINE);

    refresh();
    endwin();

    return 0;
}

컴파일 할때 -lcurses 하세요.

유닉스 기준입니다.

리눅스는 curses 가 아니라 ncurses요.

seongwon1의 이미지

아 curses를 미쳐 생각을 못했네요.

훔.리눅스에서 curses로 유치한 프로그램을 몇 개 만들어 보긴 했습니다만..

상당히 귀찮던데....-_-;

조금 더 짱구를 돌려봐야지 되겠네요. ^^;

여하튼 고수님들 답변 감사 드립니다.

litdream의 이미지

사용법이 귀찮을때는 다 이유가 있는겁니다.
사용법이 간편한것들은 만약, 지정해 놓은 기능외에
다른 기능이나, 용법과는 약간 다른 사용용도가 있을때는
귀찮음을 넘어, 매우 귀찮아 질것입니다.

IIS 와 Apache 의 configuration 을 잘 생각해보시면
IIS 는 정말 단순한 웹서버, 그것도 잘 못하는 웹서버지만,
Apache 는 사실, Web-server 로 사용되지만,
Generic Request-Response Server 라고 부르는게
더 합당하지 않을까 생각하는데용...

아~~ 물론, 매우 유연하면서도, 사용이 편하다면야
아름답기 그지없겠지만요~~~~

삽질의 대마왕...

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.