View Single Post
  #2   Spotlight this post!  
Unread 04-03-2005, 01:01
ace123's Avatar
ace123 ace123 is offline
Registered User
AKA: Patrick Horn
FRC #0008 (Paly Robotics - http://robotics.paly.net/)
Team Role: Programmer
 
Join Date: Feb 2005
Rookie Year: 2004
Location: Palo Alto, CA
Posts: 50
ace123 has a spectacular aura aboutace123 has a spectacular aura about
Send a message via AIM to ace123
Re: at commands in c++

First of all this is a forum related to the FIRST robotics competition, not programming in general.

I don't know exactly the answer to your question, but to use the COM port in Windows, I think that you output to an imaginary file called "COM1" or "COMx" (x=port number) and read inputs from that file.
FILE *read=fopen("COM1","rb"); // Read from COM1
FILE *write=fopen("COM1","wb"); // Write to COM1

This gives you only raw access to the serial/com port (so you can do basic reads and writes to some devices plugged in).

If you want to do advanced stuff like use your modem to connect to numbers or something, then I have no idea how to use it. You would probably have to use a library to use your modem. Maybe microsoft has some functions to access it.

I would just search on google; I'm sure somebody has this.
__________________
-Patrick Horn, Paly Robotics

Check out the space simulator called Vega Strike, modelled after the space simulator games Elite and Wing Commander. It's Open Source too!
If you have ever played Wing Commander, or especially Privateer, and had a feeling of nostalga derived from the you will enjoy these two Vega Strike mods: Privateer Gemini Gold and Privateer Remake!
I'm working on adding multiplayer support this year...