Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 1st, 2007, 1:54 PM   #11
Arla
Hobbyist Programmer
 
Arla's Avatar
 
Join Date: Mar 2005
Posts: 227
Rep Power: 4 Arla is on a distinguished road
Re: c++ code to read from batch file

Maybe if you post what is IN the batch file right now we could help.

It really depends if you are also trying to change the batch file to be a C++ version that just runs the same "shell" commands, or if you are trying to change it to be equivalent C++ commands that are internal to C++.
Arla is offline   Reply With Quote
Old Nov 2nd, 2007, 1:27 AM   #12
cueballr
Newbie
 
Join Date: Oct 2007
Posts: 19
Rep Power: 0 cueballr is on a distinguished road
Re: c++ code to read from batch file

Thank you Sane, and Arla your right i should have posted the code in my first post, thats the code i want to convert to c++, FYI "UNLOCK" is a function in the batch file...any help with that would be appreciated.

if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK

Thanks in advance.

cueballr. =]
cueballr is offline   Reply With Quote
Old Nov 2nd, 2007, 1:52 AM   #13
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 1,038
Rep Power: 5 lectricpharaoh will become famous soon enough
Re: c++ code to read from batch file

Quote:
Originally Posted by Infinite Recursion
May want to include the conio.h header file when using the system() function.
Why's that? I thought system() was prototyped in <cstdlib> (or <stdlib.h> for the C folks).
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is offline   Reply With Quote
Old Nov 2nd, 2007, 10:50 AM   #14
Arla
Hobbyist Programmer
 
Arla's Avatar
 
Join Date: Mar 2005
Posts: 227
Rep Power: 4 Arla is on a distinguished road
Re: c++ code to read from batch file

Quote:
Originally Posted by cueballr View Post
Thank you Sane, and Arla your right i should have posted the code in my first post, thats the code i want to convert to c++, FYI "UNLOCK" is a function in the batch file...any help with that would be appreciated.

if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK

Thanks in advance.

cueballr. =]
ALl that's saying is if a particular control exists in control panel (from how I read it) goto a section called UNLOCK, look for another section in the batch program called unlock.
Arla is offline   Reply With Quote
Old Nov 2nd, 2007, 10:56 AM   #15
cueballr
Newbie
 
Join Date: Oct 2007
Posts: 19
Rep Power: 0 cueballr is on a distinguished road
Re: c++ code to read from batch file

Um...yea i know what it means....but i wanted to know its c++ equivalent..

thanks anyway.

cueballr. =]
cueballr is offline   Reply With Quote
Old Nov 2nd, 2007, 11:21 AM   #16
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Re: c++ code to read from batch file

if (!existenceTest)
{
    // These are your immediately following statements
    ...
}else{ // This is the UNLOCK section statements
    ...
}
Pardon my saying so, but when it comes to expressing and obtaining the objective, it appears to be a case of alligator appetite overloading hummingbird ass.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Nov 2nd, 2007, 11:25 AM   #17
cueballr
Newbie
 
Join Date: Oct 2007
Posts: 19
Rep Power: 0 cueballr is on a distinguished road
Re: c++ code to read from batch file

whats (!existence text) ??
cueballr is offline   Reply With Quote
Old Nov 2nd, 2007, 11:29 AM   #18
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Re: c++ code to read from batch file

See what I mean?

C++ doesn't have an EXISTS keyword. You would have to devise a test that did the same thing and use it in the expression.

You can't translate English to Falabollian unless you know both English and Falabollian. I'd recommend you learn C++ (and programming/problem solving in general) before undertaking this task.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Nov 2nd, 2007, 11:32 AM   #19
cueballr
Newbie
 
Join Date: Oct 2007
Posts: 19
Rep Power: 0 cueballr is on a distinguished road
Re: c++ code to read from batch file

So you saying create a function "existencetest" ..okay(Y)
cueballr is offline   Reply With Quote
Old Nov 2nd, 2007, 11:41 AM   #20
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Re: c++ code to read from batch file

"Virtute tractatos in mel, malis audire prodesset in cum, vis eu hinc nominati. Sanctus scripserit ne cum, veri sapientem et duo. Has nobis blandit id.", as my Falabollian pappy used to say.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem processing file into a char array csrocker101 C++ 1 May 8th, 2007 11:50 PM
Tailing a file? titaniumdecoy Python 4 Jul 18th, 2006 1:42 PM
Read hard disk NTFS file system. hvcong C++ 6 May 12th, 2006 10:39 AM
Batch file - automate process skguha Bash / Shell Scripting 2 Oct 13th, 2005 10:59 AM
Batch File Help Nonamer64 Other Programming Languages 3 Sep 10th, 2005 5:56 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:58 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC