Any C++ programmers?

  • Thread starter hanker
  • 15 comments
  • 511 views
1,785
Just curious i this is my first year in the course, and am wondering if there are any others of you out there in case i need to ask about something.
 
Bloody hell, Turbo, what's you salary like? I've too just started a computer programming course, kinda interested in my 'prospects' :)
 
Originally posted by TurboSmoke
here to...with 7 years industrial experience :)

ask away..

Now i know who to ask if i need help, so far it not too bad, but the future assignments look pretty though
 
I believe his questions will be something along the lines of "when I get the HL2 source, will you help me hack it?"

(:
 
Originally posted by LoudMusic
I believe his questions will be something along the lines of "when I get the HL2 source, will you help me hack it?"

(:



:lol: Wasn't the source leaked today?
 
oh now i remeber what i was going to ask? what is the command (function) whatever it is called to open a cd rom from the program how would i go about opening it from the program any help??
 
Originally posted by hanker
oh now i remeber what i was going to ask? what is the command (function) whatever it is called to open a cd rom from the program how would i go about opening it from the program any help??

wow, hanker....i may have bitten off more than ican chew here...the pressure is on...:)

anyway bud...can you be more specific?..i am not sur ei understand what you are asking....are you calling a function to run an exe program situated on your CD rom drive from inside a .cpp program?

if thats you question it seems that your trying to run before you can walk....try and explain exactly what you want...

:)
 
#include <iostream>
void openCDTray()
{
std::cout << "Press the button to open the CD-ROM tray." << std::endl;
}

void closeCDTray()
{
std::cout << "Press the button to close the CD-ROM tray." << std::endl;
}
 
These are the 2 errors that i get and dont knwo what to do about!


Debug/openCD.exe : fatal error LNK1120: 1 unresolved externals


LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
 
Try this:

Private Declare Function mciSendString Lib "winmm.dll" Alias
"mciSendStringA" (ByVal lpstrCommand As String, _
ByVal lpstrReturnString As String, ByVal uReturnLength As Long,
ByVal hwndCallback As Long) As Long


Open CD-Tray
mciSendString "set CDAudio door open", t, 127, 0

Close CD-Tray
mciSendString "set CDAudio door closed", t, 127, 0
 

Latest Posts

Back