|
|
|
even I tooooooooo
never say die
|
|
|
|
|
toxcct wrote: i love that sort of tests
Well here is another one,
Writen in the wee hours of the morning
??=define _i_ int
??=define _i (??/
_i_
??=include<stdio.h>
_i_ main ??/
_i ??/
__i, char* ??/
i_??/
??(??/
??))
??=define _endl_ ;
??<char _s??/
??(9??/
??), _i__??/
??(4??/
??) _endl_
??=define _s_ _endl_ _s
??<_s_ ??/
??(0??/
??) = '??/
??=' _s_ ??/
??(1??/
??) = '??/
??(' _s_ ??/
??(2??/
??) = '??/
??/??/' _endl_
??=define _m_(m_) ? m_ :
??>_s_ ??/
??(3??/
??) = '??/
??)' _s_ ??/
??(4??/
??) = '??/
??'' _s_ ??/
??(5??/
??) = '??<' _endl_
??=define _START(s) for _i __i__ = s _endl_
??<_i_ e = (__i == 2) ? (((*i_??/
??(1??/
??)-0x30) < 0) ??/
??!??/
??! ((*i_??/
??(1??/
??)-0x30) > 9)) _m_(9) (*i_??/
??(1??/
??)-0x30): 9 _endl_
??=define _VALIDATE(v) __i__ < e _endl_ __i__++)
??<_s_ ??/
??(6??/
??) = '??/
??!' _s_ ??/
??(7??/
??) = '??/
??>' _s_ ??/
??(8??/
??) = '??-' _endl_
??>
??=define move_to(n) case n:
??<_START(0) _VALIDATE(0)
??=define skip ) _endl_ break _endl_
??<switch (__i__)
??< move_to(0)
??=define to_mem sprintf (_i__,
??<to_mem "??/
???/?=" skip
??> move_to(1)
??=define _do_i_ "%d. "
??< to_mem "??/
???/?(" skip
??>move_to(2)
??< to_mem "??/
???/?/" skip
??> move_to(3)
??< to_mem "??/
???/?)" skip
??=define move_screen printf (
??=define show_single(i) , _s ??/
??(i??/
??)
??=define _char_ " %c"
??>move_to(4)
??< to_mem "??/
???/?'" skip
??> move_to(5)
??< to_mem "??/
???/?<" skip
??=define _endl_null_ return 0 _endl_
??>move_to(6)
??< to_mem "??/
???/?!" skip
??> move_to(7)
??< to_mem "??/
???/?>" skip
??=define _text_ " %s means "
??>move_to(8)
??< to_mem "??/
???/?-" skip ??>
??>move_screen _do_i_ "_text_"_text_"_char_"_char_"??/
??/n", __i__, _i__ show_single (__i__)) _endl_
??>
??>
??> _endl_null_
??>
Have fun
codito ergo sum
|
|
|
|
|
of course, we have to know the C++ compiler digrams/trigrams... which i actually don't know by heart, and hope i'll never have to code this way !!!
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
We discovered the excistance of trigraphs during an assembly analysing session
trying to figure why this d*mned compiler didn't something completly different
than designed to
codito ergo sum
|
|
|
|
|
|
You (we?) have done the trivial part. Now as to understand how the india map is encrypted in the string is another story...
~RaGE();
|
|
|
|
|
|
Maybe not.
Obviously, the string contains three infos : spaces, ! and when to print a carriage return.
Since c is always incremented, a carriage return is output whenever c reaches 30.
Otherwise, a ! is printed if b is even and a space is printed if b is odd. Since b is incremented only in the first for, then each letter in the string describes a sequence of spaces or of !. So to print 14 spaces, 15 !, [here you must print at least 30 spaces before carriage return, so] 30 spaces, 1 carriage return, 26 spaces, 17 !,
you have in the string 14+64 , 15+64, 30+26+64, 17+64, and so on.
So it is not that complicated I could even draw the map of France
~RaGE();
|
|
|
|
|
i do not understand well, but i'll firstly try to run it at how this evening (as i don't have any VC++ installed at office)...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
Actually I was wrong. c is of no use actually, since there is a bug in the code and it does not get reinitialised to 0. so the carriage return is only set once.
The code prints out the india map only on a 'standard' dos box, with standard size. So the code in the map is even simpler, it is 64+number of spaces, 64+number of !,64+number of spaces, 64+number of !,and so on.
Cristal clear
~RaGE();
|
|
|
|
|
Try this out:
int a,b,c;
int count = 1;
for (b=c=10;a="Hello!CodeProjectRules!HHHFHDEDZ!NBIJG \
DCDZ!OBICDCHDADZ!PBICDCIGZ!QBICDCHDADZ!P \
BIJGDCDZ!OBJHGDEDZ!N!Z!Z!Z" [b+++13]; )
for(; a-- > 64 ; )
putchar (33^b&1);
~RaGE();
|
|
|
|
|
I'm sorry to ask such simple questions that I'm sure must seem pretty easy to you guys.
Fist off, I would like to place or append an Int value to a CString, but it will not work. How could I go about doing this.
exp of what I'm trying to do
int num;
CString str;
num = 2;
str = "the number is " + num;
Second, is there a way of making an array with infinite variables? Or have its number of variables be defined with in the program so that it can change.
Thank You!
"To an optimist the glass is half full.
To the pessimist the glass is half empty.
To the programmer the glass is twice as big as it needs to be."
GC13: "Mature-Ages 16 and up. 'your mature, right?'"
FARGORE: "no, but I am over 16."
-- modified at 5:23 Wednesday 25th January, 2006
|
|
|
|
|
FARGORE wrote: Fist off, I would like to place or append an Int value to a CString, but it will not work. How could I go about doing this.
Use CString::Format()[^]
str.Format("the number is %d", num);
FARGORE wrote: Second, is there a way of making an array with infinite variables?
Sure, if you've got infinite memory
FARGORE wrote: Or have its number of variables be defined with in the program so that it can change.
That's easier, rather than using a traditional C style array, try using an MFC CArray[^] instead
--
Help me! I'm turning into a grapefruit!
Buzzwords!
|
|
|
|
|
FARGORE wrote: int num;
CString str;
num = 2;
str = "the number is " + num;
str.Format("The number is: %d", 2);
Jesus Loves <marquee direction="up" height="40" scrolldelay="1" step="1" scrollamount="1" style="background:#aabbcc;border-bottom:thin solid 1px #6699cc">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
FARGORE wrote: I would like to place or append an Int value to a CString
I would use boost[^]::lexical_cast or its verbose equivalent, std::ostringstr
int i = 10;<br />
std::ostringstr stream;<br />
stream << i;<br />
CString s( stream.str().c_str());
Using CString is OK, but there is nothing wrong with using the C++ builtin std::string
FARGORE wrote: is there a way of making an array with infinite variables
I would personally use a std::vector of boost[^]<code<code>>::shared_ptr. This way, you can approach infinite sufficiently for almost all practical means.
Be sure not to mis-use the std::autoptr with collections of any kind!
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
Can anyone tell me how to find out the Absolute path of a folder open in a Windows Explorer Window?
Thanks and Regards,
Anil
|
|
|
|
|
I'm not 100% sure, but I think that IShellView will be needed.
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
Hello does anybody have the Wbemuuid.lib library? I do not have it in my SDK.
If you know a link to the source of this library, please hook it up. or if you have it please email it to me.
Kelvin Chikomo
|
|
|
|
|
Microsoft SDK from Feb 2003 has this, or you can download the XP SP2 one.
Incidentally, did everyone see the note that future SDKs will not work with VC++6 ?
They really are serious about getting people to upgrade, aren't they ?
Steve S
Developer for hire
|
|
|
|
|
Thanks let me google XP SP2
Kelvin Chikomo
|
|
|
|
|
I'm using the "Microsoft Development Environment 2003" in order to develop an MFC dialog-based application. I have created a new menu and it was given the ID IDR_MENU1 , by default.
Is it possible to change the name of this ID by the use of some environment interface feature? I would rather avoid to touch the resource files directly...
"quot capita, tot sententiæ"
rechi+
|
|
|
|
|
of course it is possible, and thanksfully, the resource editor exist for that purpose !!!
just go to the menu properties, check the ID property, and rename it to something more descriptive, like IDR_FILE_MENU for example.
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
toxcct wrote: check the ID property
Unfortunately it appears as grayed, displaying the message "ID cannot be edited"
"quot capita, tot sententiæ"
rechi+
|
|
|
|