Hi Kamil, If you would target you application for Air you would be able to write to a file without the workaround of trace() and manual copy of the results. See: http://livedocs.adobe.com/flex/3/langref/flash/filesystem/FileStream.html <http://livedocs.adobe.com/flex/3/langref/flash/filesystem/FileStream.html> Secondly you can take a free flash IDE such as Flash develop (FlashDevelop is a free and open source (MIT license) source code editor.) See: http://www.flashdevelop.org/wikidocs/index.php?title=Main_Page
<http://www.flashdevelop.org/wikidocs/index.php?title=Main_Page>Regards, Petru On Tue, Apr 13, 2010 at 9:28 AM, Kamil Waheed <[email protected]> wrote: > Look, I have a different situation here and would really appreciate if > you clarify that as well. > > I am working with Flash AS3. I can make the Flash easily read the > input.in file and generate an output but due to flash's limitations it > won't be able to create a new output.out file. What I will do, is > generate the output in flash's own output field(just like tracing > errors), and then copy the whole text from there and save it onto a > output.out file manually using wordpad or some other software. Is that > fine? > > Also, I see in the help topics, that we can use any compiler as soon > as it is available for anyone to test my source code. Whereas, Flash > CS4(which I prefer to work with) is available for free as a 30 day > trial. Fair enough? > > On Apr 9, 2:33 pm, Bharath Raghavendran <[email protected]> wrote: > > Let me give you an example. Suppose google asks you to write a code to > > add 2 numbers present in input file. It will make you download an > > input.in file which will look like below when opened in notepad or > > similar editors : > > > > 1 2 > > > > Also, once you solve the question you will be expected to upload the > > output file and the source code. The output file will be expected to > > look like this : > > > > Case #1: 3 > > > > There are 2 ways to solve this. One is make your input and output > > directly from/to the file. Second is do it from stdin/stdout and use > > redirection operators to make it use the files instead. I prefer the > > second one because its easier to test. For the first case, your code > > will look like this. (I didn't try compiling them. hope my code works) > > > > #include<fstream> > > using namespace std; > > > > int main() > > { > > ifstream fin("input.in"); > > ofstream fout("output.out"); > > int a,b,c; > > fin>>a>>b; > > c = a+b; > > fout<<"Case #1: "<<c<<endl; > > fin.close(); > > fout.close(); > > > > } > > > > Compile the code using "g++ code.cpp". You will get an executable as > > a.out in linux and a.exe in windows. Keep the input file (input.in) in > > the same folder as this executable and run the executable ("a.exe" in > > windows and "./a.out" in linux). This will give you the output file > > output.out in the same folder. > > > > For second option, in the previous code, replace fin by cin, fout by > > cout, remove declarations of fin and fout, remove lines closing these > > file handlers and use header file iostream instead of fstream. Compile > > the code. When you run the executable now, it will expect input in the > > terminal. You can put your sample inputs and test it. To run with > > file, use command "a.exe < input.in > output.out" in windows and > > "./a.out < input.in > output.out" in linux. > > > > On 9 April 2010 14:05, paulsmithenator <[email protected]> > wrote: > > > > > > > > > How do you take any input in any of your programs? > > > > > Paul Smith > > > > > [email protected] > > > > > On Fri, Apr 9, 2010 at 8:19 AM, dgcooldue <[email protected]> wrote: > > >> but how do we use them seems to be the main question here...... > > >> We are confused how do we take them as input in our program.. > > > > >> On Fri, Apr 9, 2010 at 3:20 AM, Luiz Gustavo Rocha Soares > > >> <[email protected]> wrote: > > > > >>> What each number means is described in the problem description. > > >>> Luiz Gustavo Soares > > >>>http://luizsoares.net > > > > >>> On Thu, Apr 8, 2010 at 3:23 PM, sandy <tHe dAGgeR> < > [email protected]> > > >>> wrote: > > > > >>>> what to do with the numbers in the .in files???? > > > > >>>> -- > > >>>> You received this message because you are subscribed to the Google > Groups > > >>>> "google-codejam" group. > > >>>> To post to this group, send email to [email protected]. > > >>>> To unsubscribe from this group, send email to > > >>>> [email protected]<google-code%[email protected]> > . > > >>>> For more options, visit this group at > > >>>>http://groups.google.com/group/google-code?hl=en. > > > > >>> -- > > >>> You received this message because you are subscribed to the Google > Groups > > >>> "google-codejam" group. > > >>> To post to this group, send email to [email protected]. > > >>> To unsubscribe from this group, send email to > > >>> [email protected]<google-code%[email protected]> > . > > >>> For more options, visit this group at > > >>>http://groups.google.com/group/google-code?hl=en. > > > > >> -- > > >> With Regards, > > >> Dipanshu Gupta > > > > >> -- > > >> You received this message because you are subscribed to the Google > Groups > > >> "google-codejam" group. > > >> To post to this group, send email to [email protected]. > > >> To unsubscribe from this group, send email to > > >> [email protected]<google-code%[email protected]> > . > > >> For more options, visit this group at > > >>http://groups.google.com/group/google-code?hl=en. > > > > > -- > > > You received this message because you are subscribed to the Google > Groups "google-codejam" group. > > > To post to this group, send email to [email protected]. > > > To unsubscribe from this group, send email to > [email protected]<google-code%[email protected]> > . > > > For more options, visit this group athttp:// > groups.google.com/group/google-code?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "google-codejam" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-code%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-code?hl=en. > > -- You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-code?hl=en.
