Thread: C Chat Room

  1. #1
    Registered User
    Join Date
    Jun 2005

    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 int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    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.

  3. #3
    Registered User
    Join Date
    Jun 2005
    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.

    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


    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.


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, 07:59 PM
  3. A chat room?
    By Padawan in forum Networking/Device Communication
    Replies: 3
    Last Post: 11-19-2003, 07:32 PM
  4. Netwoking Chat Room ??
    By Studnet in forum A Brief History of
    Replies: 0
    Last Post: 11-05-2001, 11:53 PM
  5. programming chat room
    By iain in forum A Brief History of
    Replies: 0
    Last Post: 08-18-2001, 06:50 AM