Monday, May 24, 2010

How to convert a program written in wordpad and compile in c?

I want to write a program in wordpad and the open the file in c editor and then compile .


u may feel it as stupidity


bur if u want to write a large and complicated program and only want to know the output of the program.


for example (a program on web)


#include %26lt;stdio.h%26gt;





main(t,_,a)


char *a;


{return!0%26lt;t?t%26lt;3?main(-79,-13,a+main(-8...


main(-86, 0, a+1 )+a)):1,t%26lt;_?main(t+1, _, a ):3,main ( -94, -27+t, a


)%26amp;%26amp;t == 2 ?_%26lt;13 ?main ( 2, _+1, "%s %d %d\n" ):9:16:t%26lt;0?t%26lt;-72?main(_,


t,"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*...


,/+#n+,/#;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l q#'+d'K#!/\


+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#... i;# ){n\


l]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#\


n'wk nw' iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c \


;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'...


#'rdq#w! nr'/ ') }+}{rl#'{n' ')# }'+}##(!!/")


:t%26lt;-50?_==*a ?putchar(a[31]):main(-65,_,a+1):main((*a == '/')+t,_,a\


+1 ):0%26lt;t?main ( 2, 2 , "%s"):*a=='/'||main(0,main(-61,*a, "!ek;dc \


i@bK'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);}

How to convert a program written in wordpad and compile in c?
Why don't you want to write the program using the C editor ?


Most src files are text based anyway so you can write a program in any text editor as long as you save it as plain ascii with the .c extension you can open it in a c compiler.





To avoid having to create a project look at the command line features of your compiler or get gcc for windows.
Reply:Step 1: Stop writing your programs in Wordpad. Either get a plain text editor. http://en.wikipedia.org/wiki/List_of_tex... Notepad++ works quite nicely on windows. Cream (Vim really) is amazing, if you can use it. And there's more respectable choices like PSPad, UltraEdit, ScITE, and so on.





Or better yet, get a proper IDE. http://msdn2.microsoft.com/en-us/vstudio...


http://www.codeblocks.org/


http://wxdsgn.sourceforge.net/





Step 2: Get a compiler. Visual Studio has Visual C++. You can get Visual C++ express for free, but you don't get Visual Studio for an IDE (use Code blocks or Dev-C++). Or gcc / MinGW (http://www.mingw.org/ ). If you write in a plaintext editor, you're going to have manually call the compiler and linker, etc. with the right arguments. If you have an IDE, that will be done automatically if you configure the IDE to use the compiler.


No comments:

Post a Comment