C++ compiler
Post Reply
Quote
Re: C++ compiler
Posted by Edge Damodred on Sat Jan 17th at 8:08pm 2004


? posted by OtZman

I've never heard of a loop before. I'm totally new to programming, but I thing I start to understand what a loop is, but I don't get how to make letters like ?, ?, ? to appear on my screen

How to make those appear on purpose or on accident.

On accident it's just random chode(garbage) that was picked up in the memory that that was grabbed and it interprets it as characters.

but yeah, to see if it's in ASCII, use the for loop and modify the output statement slightly to see the corresponding numbers

cout<<"\n"<<(char) i <<'\t'<< i;

Oh, for single characters and escape sequences(anything that starts with \), you can just use a single quote.

To print out the character '\', you'll have to do '\\' to get the compiler to shut up about illegal escape sequences and stuff, even when you send in directory strings as well.

Oh yes, the C++ Primer Plus is definitely an awesome book, it really covers just about everything in C++ and even goes a bit into some data structures like Linked Lists. If you can afford the Fourth Edition, go for it.

Dammit, I'm going on a ramble again , that's what you get for doing nothing but programming since May. Right now I'm trying to understand how BSP trees work to see if I could use one for the game engine I'm writing for my group's final project.

[addsig]




Quote
Re: C++ compiler
Posted by matt on Sat Jan 17th at 8:21pm 2004


/*
TOP SECRET Microsoft(c) Code
Project: Chicago(tm)
Projected release-date: Summer 1998
*/

#include "win31.h"
#include "win95.h"
#include "evenmore.h"
#include "oldstuff.h"
#include "billrulz.h"
#define INSTALL = HARD

char make_prog_look_big[1600000];

void main()
{
while(!CRASHED)
{
display_copyright_message();
display_bill_rules_message();
do_nothing_loop();
if (first_time_installation)
{
make_50_megabyte_swapfile();
do_nothing_loop();
totally_screw_up_HPFS_file_system();
search_and_destroy_the_rest_of_OS/2();
hang_system();
}
write_something(anything);
display_copyright_message();
do_nothing_loop();
do_some_stuff();
if (still_not_crashed)
{
display_copyright_message();
do_nothing_loop();
basically_run_windows_3.1();
do_nothing_loop();
do_nothing_loop();
}
}

if (detect_cache())
disable_cache();

if (fast_cpu())
{
set_wait_states(lots);
set_mouse(speed, very_slow);
set_mouse(action, jumpy);
set_mouse(reaction, sometimes);
}

/* printf("Welcome to Windows 3.11"); */
/* printf("Welcome to Windows 95"); */
printf("Welcome to Windows 98");
if (system_ok())
crash(to_dos_prompt);
else
system_memory = open("a:\swp0001.swp", O_CREATE);

while(something)
{
sleep(5);
get_user_input();
sleep(5);
act_on_user_input();
sleep(5);
}
create_general_protection_fault();
}

is what I say to windows programming!

[addsig]




Quote
Re: C++ compiler
Posted by Crono on Sat Jan 17th at 9:54pm 2004


ha ha ->matt. I wonder if everyone will understand after reading that . . .

Devloping non-object oreiented stuff in C++ is bassically the same as developing in C. If you wanted it to run efficiently and fast, use OOP. I mean, jesus the only difference really is the compiler, the languages aren't as different as you guys are saying, a 3rd of C++ is C, even now.

The primer rules indeed . . . didn't I suggest getting a used copy? I thought I did . . . hmm. Well if I didn't . . . look for a used copy, it will be very cheap. Get ready to learn what an array REALLY is lol.

By the way, I know no one has mentioned this, but. If you ever want to use Java, use JAVA, and not something like C#. Even though they are different languages, C# is like MS's version of a Manditory Object Oriented Programming Language . . . and we all know Sun blows Microsoft Away.

Oh, if you really hate Microsoft and you're not inept in Unix, try building a practice 'box' putting Linux on it (I suggest SuSe any version it would be best to go after 7.2). It's free, it's better/faster/more reliable/gives more control. Then for the applications you want to run that are from windows, install Wine, or Wine-X. I think most every program works. . . except hammer lol. Because wine isn't an emulator and all sorts of crap. But there's a butt load you can do. Like download apache (which is also free) and set your self up a web server for your own site.
And if you try out Linux you'll find sweet security. (unless you insist on being logged in as root all the time.)

I've rambled long enough. [addsig]




Quote
Re: C++ compiler
Posted by Forceflow on Sat Jan 17th at 10:16pm 2004


Lol, Matt. (I do understand it.)

And Mandrake Linux runs great, too.





Quote
Re: C++ compiler
Posted by Leperous on Sat Jan 17th at 10:34pm 2004


## top secret Lunix code, original non-Unix code really!

require command_prompt('1980s');
require special_lunix_version_of_program('rare');

while doing_some_stuff_windows_can_do_anyway() {
inflate_user_ego('nerd');
make_random_kernel_errors('fnarg','unf');
be_sued_by_sco('$10000000');
end_up_nowhere_really('quickly');
switch_desktop('no reason','use a taskbar');
support_communism();
}

Yeah I know it's not C++, but I'm a PHP man





Quote
Re: C++ compiler
Posted by Forceflow on Sat Jan 17th at 10:43pm 2004


lol Lep





Quote
Re: C++ compiler
Posted by Edge Damodred on Sat Jan 17th at 11:30pm 2004


Hehe Lep, I'd have to agree with that.

It's funny, people hate MS, but when it comes to DX, they almost seem to worship it. Most of DX is okay, except D3D, I fricken hate programming for it. <OGLFANBOYISM >OGL all the way!!! </OGLFANBOYISM>

Actually, I'll get around to restudying D3D, but I do like OpenGL oh so much better.

[addsig]




Quote
Re: C++ compiler
Posted by OtZman on Sun Jan 18th at 12:19am 2004


? posted by Edge Damodred

but yeah, to see if it's in ASCII, use the for loop and modify the output statement slightly to see the corresponding numbers

cout<<"\n"<<(char) i <<'\t'<< i;

Oh, for single characters and escape sequences(anything that starts with \), you can just use a single quote.

To print out the character '\', you'll have to do '\\' to get the compiler to shut up about illegal escape sequences and stuff, even when you send in directory strings as well.

Wow, thx Edge Damodred, now I can make ?, ? and ? and whatever I want! Thx a lot!!

*EDIT*\

What was that thing you were talking about I had to adjust?:

? posted by Edge Damodred

How to make those appear on purpose or on accident.

On accident it's just random chode(garbage) that was picked up in the memory that that was grabbed and it interprets it as characters.

but yeah, to see if it's in ASCII, use the for loop and modify the output statement slightly to see the corresponding numbers

I just noticed that the numbers in the ASCII chart didn't represent the right letters correctly. Is there a way to adjust them so they do?

/*EDIT*

[addsig]




Quote
Re: C++ compiler
Posted by OtZman on Sun Jan 18th at 2:08pm 2004


This ASCII thing makes no sense at all! It's totally illogical. The numbers seem to have nothing to do with the letters. I also checked http://www.asciitable.com and it was the same thing there. Totally illogical. [addsig]



Quote
Re: C++ compiler
Posted by Edge Damodred on Sun Jan 18th at 7:04pm 2004


Welcome to programming [addsig]



Quote
Re: C++ compiler
Posted by OtZman on Sun Jan 18th at 9:24pm 2004


I've decided to make my "own" ASCII chart now. I simply test all the numbers 1-255 to see what letter they represent.

[addsig]



Quote
Re: C++ compiler
Posted by scary_jeff on Mon Jan 19th at 12:25am 2004


Sorry if you already did this, but in the second table at asciitable.com, did you convert the numbers into hex? To output ?, do cout << "\x86";. For ?, use cout << "\x84";, etc.



Quote
Re: C++ compiler
Posted by OtZman on Mon Jan 19th at 3:28pm 2004


I've already done that... but how do I convert the numbers into hex? [addsig]




Post Reply