![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Hobbyist Programmer
Join Date: Mar 2005
Posts: 227
Rep Power: 4
![]() |
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++. |
|
|
|
|
|
#12 |
|
Newbie
Join Date: Oct 2007
Posts: 19
Rep Power: 0
![]() |
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 UNLOCKThanks in advance. cueballr. =] |
|
|
|
|
|
#13 | |
|
Caffeinated Neural Net
![]() Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 1,038
Rep Power: 5
![]() |
Re: c++ code to read from batch file
Quote:
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 |
|
|
|
|
|
|
#14 | |
|
Hobbyist Programmer
Join Date: Mar 2005
Posts: 227
Rep Power: 4
![]() |
Re: c++ code to read from batch file
Quote:
|
|
|
|
|
|
|
#15 |
|
Newbie
Join Date: Oct 2007
Posts: 19
Rep Power: 0
![]() |
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. =] |
|
|
|
|
|
#16 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Re: c++ code to read from batch file
if (!existenceTest)
{
// These are your immediately following statements
...
}else{ // This is the UNLOCK section statements
...
}
__________________
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 |
|
|
|
|
|
#17 |
|
Newbie
Join Date: Oct 2007
Posts: 19
Rep Power: 0
![]() |
Re: c++ code to read from batch file
whats (!existence text) ??
|
|
|
|
|
|
#18 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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 |
|
|
|
|
|
#19 |
|
Newbie
Join Date: Oct 2007
Posts: 19
Rep Power: 0
![]() |
Re: c++ code to read from batch file
So you saying create a function "existencetest" ..okay(Y)
![]() |
|
|
|
|
|
#20 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
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 |