C Chat Room

This is a discussion on C Chat Room within the C Programming forums, part of the General Programming Boards category; I was hoping to make a unix/linux C chat room without sockets, just locally. I can't figure out how to ...

  1. #1
    Registered User
    Join Date
    Jun 2005
    Posts
    5

    C Chat Room

    I was hoping to make a unix/linux C chat room without sockets, just locally. I can't figure out how to keep the input at the bottom and output at the top. I was really just trying to do this for a self-lesson, hoping to learn some things.

    I was hoping someone could point me in the right direction. I was able to move the cursor and get single characters but that is about all. Any links to tutorials would be appreciated, thanks.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,452
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Jun 2005
    Posts
    5
    Thanks for your help. I got a lot of it working now, but I am having a problem figuring out how to read from the chat log (update screen) while still allowing user input. I read that I could use cbreak or halfdelay but that seems to only work with single character input.


    --edit--
    I think I found my answer on the FAQ eventually.

    I guess I have to getch and append to a buffer.

    I'm still not sure how cbreak() comes into play, however.
    Last edited by bnovc; 06-26-2005 at 05:12 PM.

  4. #4
    Registered User
    Join Date
    Mar 2005
    Posts
    135

    ...

    I did this once on windows. Yes, you would have to use something like getch(0 for this. I updated the screen by using an array of pointers.

    If you need an example, let me know.

    xeddiex.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need some help with my chat room code !!
    By beaditya in forum C Programming
    Replies: 2
    Last Post: 09-10-2005, 04:37 PM
  2. Chat room software.
    By adrianxw in forum Tech Board
    Replies: 4
    Last Post: 01-14-2004, 06:59 PM
  3. A chat room?
    By Padawan in forum Networking/Device Communication
    Replies: 3
    Last Post: 11-19-2003, 06:32 PM
  4. Netwoking Chat Room ??
    By Studnet in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 11-05-2001, 10:53 PM
  5. programming chat room
    By iain in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-18-2001, 06:50 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21