|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
trying to resolve types - help me!!!
Hi guys,
I need to check from a sample cpp program if the foll. declaration exists: const int *x = new const int; it has to be replaced as const int *x = new const int(3); Problem is if it exists only once in the prg script is working fine. for multiple occurences there is a problem used grep cmd to search and then used cut to get the type and then used sed to replace Plz let me know soon |
|
#2
|
||||
|
||||
|
Can you use a perl script instead. I might have one lying around that does find/replace on multiple files.
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by sizeablegrin, etienne141 and L7Sqr, superior C/C++ programmers of the month |
|
#3
|
|||
|
|||
|
no can't use perl
Hi
Thanks for ur reply.But, we can't use PERL. I tried to read the sample code line by line using a temp file and then within the while structure i used a case structure for the various occurrences of int,float,double . with the help of sed statement i replaced new const int with new const int(3) using a variable for the default value. Problem is only the last done replacement is there. rest everything is overwritten. What should i do???? |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > trying to resolve types - help me!!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|