I'm brand new to C# and I'm trying to figure out how to parse a string. Is there a function available much like the explode() function in PHP which breaks up the string on a certain character and places the different parts into an array?
Camron
Posts
-
parsing a string -
Running a batch fileSo what you're saying is write a batch file that will take in the date and then call the original batch file to run? That makes sense but why can the original batch file be called from the prog? Also this is something I am wanting to be automated and run every day. So I can't just have a static date.
-
Running a batch fileI'm trying to write a program that will initiate a batch file. For some reason the program keeps crashing. I'm not too familiar with the createprocess function so I figure I'm doing something wrong with that. To run the program in a DOS prompt I must be in the path U://telmage/ To run the process I type telmage 09 19 05 or the previous days date. Does anyone have any idea what I might be doing wrong? [CODE] void main() { char path_buffer[_MAX_PATH]; char GTime[80]; time_t now; UINT value; now = time(NULL); time_t yesterday = now - 86400; strftime(GTime,sizeof GTime,"telmage %m %d %y",localtime(&yesterday)); _makepath( path_buffer, "U", "\\telmage", GTime, "" ); cout<
-
converting ebcdic to asciiI need a program to convert my text from ebcdic to ascii. Is there any tutorial or code out there that will help me do this?
-
iSeries AS400 APIsAn API on the PC that can communicate with the AS/400.
-
iSeries AS400 APIsDoes anyone know of any iSeries AS400 APIs?
-
getting yesterday's dateOk i'm using this code to return a date, but the problem is I need the date of the day before this. How could I subtract a day from the date? And what if it's the first of the month, the day before that would be the previous month? Any suggestions? char GTime[80]; time_t now; now = time(NULL); strftime(GTime,sizeof GTime,"%m %d %y\n",localtime(&now)); cout<
-
making a path to a fileI'm trying to make a path to a batch file and then processing the batch file. Does anyone know how I should do this?
-
Returning a dateI'm very rusty, but I can't find any function on MSDN about returning a date. Can anyone help me?
-
Using readfile()Does anyone have any examples on how to use the readfile() function. This is my first time to use it and I'm taking the instructions straight from MSDN and it's not working. Here is what I have. HANDLE fptr; bool bResult; LPVOID inBuffer; DWORD nBytesToRead = 20; LPDWORD nBytesRead = 0; bResult = ReadFile(fptr, &inBuffer, nBytesToRead, nBytesRead, NULL); I don't think I fully understand how the function works.
-
Trouble opening large fileThanks so much for your help...CreateFile worked..
-
Trouble opening large fileOops..nevermind I was in the WindowsCE part of MSDN..
-
Trouble opening large fileTo use CreateFile() I must have the Coredll.lib. Where do I find this lib?
-
Trouble opening large fileI'm having trouble opening a 3 GB file. I've never had to open a file so large before and I'm nost sure what to do. I've tried fopen and open functions but the program fails to open the file. Any suggestions?