Jump to content

If you like to learn about computers/software


cozofdeath
 Share

Recommended Posts

  • Replies 98
  • Created
  • Last Reply

Top Posters In This Topic

Nope. I did have the 5mb cable but I never got near 5mb, I don't even think over 3mb. God do we need fiber up here. Hows your service? Do you have DSL?

Dude , You should move out here then. , Here you can choose from - DSL , Cable , And soon Fiber Optic..

That fiber optic stuff is all over this little town , It's just not in use as of yet.. Oh yea.? , Then there's dial-up ( ha ha )

I'm only on dial-up right now , I hope i can do something better here soon..

Link to comment
Share on other sites

Dial up is ruff. :D I remember them times. I used to get such slow speeds (2-4K), even for dial-up. I'm glad its over though. I don't think I could go back. Fiber, yeah thats for me. If I must move so be it. :lol: Well I might wait a little before that but it would be nice to see something like 8mb on a speed test. :D

Link to comment
Share on other sites

Yeah, sorry! I sent you one back. I'm going to be switching ISPs with in the next couple days so its going to be shutdown till I can find a better one. But yeah the new mysql crap isn't working correctly for a couple of the site MODs I'm trying to install so its been messing stuff up. Since I'm not a good sql or php person I really suck at fixing the problems. :( As soon as I find an ISP I'll bring it back up and fix it, plus I should have a lot to put on it. I'm looking at it as a good time to focus on C++ and the rest of life. So I'll probably be missing for a while. The people at alt.comp.lang.learn.c-c++ seem helpful if you ever get stuck while compiling. I just asked a question and they gave me some good answers.

Link to comment
Share on other sites

Holy x86 stuff. :lol: There is a lot on that page! I just got online again. Not sure how long it will be for but I did find out, if your using dev-c++, that development has been taken over by the Code::Blocks team. I haven't tried it out yet but it looks promising. I'm now getting into advanced pointers, unions, structures, and classes, god help me. I also ditched the book I was reading for a much newer one, mostly because c++ does change over time and some things mainly preprocessor things were not compiling and being read right. I'm reading C++ for Dummies 5th E. and the author uses an almost up to date version of dev-c++.

On an interesting note I've learned by reading and using pointers that addressing memory not in your program space will cause an c0000005 violation error. Which is on this board several places and all over the net. Its usually cause by a buffer overrun but I tried to access some out of bounds memory addresses to see whats in there just for fun, not thinking of Windows memory being protected and thats the error you will get in your event log. Its very useful to know because anyone finding this in your program can insert arbitrary code in that overrun and execute commands. Viruses and things like that like to do this. Also, its safer to accept buffer length along with the user input whenever possible, that way you can avoid buffer overflows/runs. Managed code (.net) doesn't have some of these problems, because the compiler handles memory usage among other things. Just some useful info if you didn't already know.

Link to comment
Share on other sites

Buffer overrun is the cause of many software failures. It is mostly caused by careless programming, e.g. using constant literals for loops or memcpy functions. It is far safer to use defined literals that are used for both declarations and access to data pools, e.g. strings.

These literals should be defined in a header file.

#define USERID_SIZE		16

Then only use this defined literal to declare and access data associated with it.

my_function()
{
unsigned char[USERID_SIZE] userid;

...

memcpy(&userid, &usersource, USERID_SIZE);

...
}

This way, if you ever need to change the length of the userid string, you change it only in one place. This may seem trivial in a small program, but mind you there are applications that are built with hundreds or thousands of source files. If you code it right from the beginning, such changes are very easy at the end.

Link to comment
Share on other sites

I agree. I need more work on defining constants in general. I always forget to about them and because of the preprocessor problems I've had. I've pushed all that fun stuff to the side for now. It really does help though. So how do you know all of this Pat? I knew you were into VB but I didn't know you liked (or maybe not like) C.

Link to comment
Share on other sites

So you have solved the precompiler problems? Actually these definitions (#define) are also part of the precompiler. In fact anything that starts with # is processed by the precompiler.

Re VB; actually I don't know anything about VB. C, and to a lesser degree C++, are my languages of choice. But I also do Pascal, PL/I, and (if I have to) Cobol. And I like to write complex things in assembler code. One of these days I hope to learn some Java.

It's not just for fun I do this (although it is a lot of fun), I am a software developer. System software, that is. E.g. the last few years I have been working on an SQL database engine project.

Link to comment
Share on other sites

Some useful precompiler directives.

#include "file.h"

Used to include header files, e.g. with your #define instructions, data structures, etc.

#if

Very useful for conditional compiling. I use it often for debugging, e.g. to write the status of some variables to an output file. It can also be used to create different versions of an application for different platforms (certain things may be slightly different on Unix or Windows).

What is tested with #if (or #ifdef) can be defined in the program or header file, or it can be specified with the -D compiler option.

Examples

#if (OPSYS == UNIX)
/* Place Unix code here */
#elif (OPSYS == WIN32)
/* Place Windows code here */
#else
/* Issue error message */
#endif

#ifdef DEBUG
/* Place debug code here */
#endif

This debugging stuff can be very helpful. You can use it while developing and debugging, and once it is complete, you can leave the stuff in the source, but compile a clean version without the -D DEBUG compiler option. This way you can reuse the debugging stuff while working on version 1.1

Link to comment
Share on other sites

No I haven't solved them yet. Mostly because they haven't showed up yet in this other book I've been reading. I might try them today depending on how today goes. I worked fine with simple search and replace commands like #define AGE 50 or something like that. It was the #if, #endif, #else, #ifdef, #ifndef, and #undef ones that no matter how I edited them they never worked right. Maybe it was me or the compiler I'm using?

Link to comment
Share on other sites

I can't right know, I just don't know enough about the C language to do it. Its possible with a very simple batch file depending on how you want to mess up the computer. Anything capable of messing up a Windows computer would probably have to be run in an admin account to do it. I think it would be cool to write some prank programs. Like something that moves your mouse all over every minute or so, or a small program to flip the screen upside down. Maybe every time you click the start button you get a funny sound. But I'm no where near that yet. If you want to see a life like robot check this out. I think her maker on the right is staring at her silicon booty. :lol: Have you seen the Japanese robot fights...

http://www.youtube.com/watch?v=WV0FttVRHG4

http://www.youtube.com/watch?v=pVujJz8oTb0

Link to comment
Share on other sites

hi, i'm back!

can you guys make something that will completely make a computer totally broken [f*cked up] {sorry for the language}

something else:

we are now building a way better robot! it looks more like a robot! and can do much more

Why would you want to do that...??? Someone you're ticked off at..?

Try these then... http://www.rjlsoftware.com/software/entertainment/

Link to comment
Share on other sites

hi, i'm back!

can you guys make something that will completely make a computer totally broken [f*cked up] {sorry for the language}

something else:

we are now building a way better robot! it looks more like a robot! and can do much more

Easy: install some Symantec software :lol:

Link to comment
Share on other sites

hi, i'm back!

can you guys make something that will completely make a computer totally broken [f*cked up] {sorry for the language}

something else:

we are now building a way better robot! it looks more like a robot! and can do much more

Easy: install some Symantec software :lol:

Boy , Ain't that the truth..! :rolleyes: :lol:

Link to comment
Share on other sites

No I haven't solved them yet. Mostly because they haven't showed up yet in this other book I've been reading. I might try them today depending on how today goes. I worked fine with simple search and replace commands like #define AGE 50 or something like that. It was the #if, #endif, #else, #ifdef, #ifndef, and #undef ones that no matter how I edited them they never worked right. Maybe it was me or the compiler I'm using?

How about you show us your problem with the precompiler directives? Maybe we can get it to work together.

Link to comment
Share on other sites

Why would you want to do that...??? Someone you're ticked off at..?

yes i am [actually that one killed the pc of a friend of mine, so we want to kill that pc! REVENGE!!]

so if you could think of a good way to kill that pc [as silent as possible > very unnoticed, but effective!], let me know

Link to comment
Share on other sites

Well its not in the forum rules to post things like this, so I'll take a stab at it. Your main problem will be Windows File Protection, and restores. If all you want to do is disable Windows from loading, and not have any fun with it :( , I would delete or change startup files. A simple change to the boot.ini should shut it down. However a restore will probably fix the problem so you would have to first delete the restores. There are so many ways but having not ever tried them I can't really know for sure what would be the best. Messing with partition information would probably work. Changing a byte or more in files can cause very hard to find errors, this can be done with a hex editor, maybe even a text editor. In most cases the program will not run at all. How much time will you get to do this?

Link to comment
Share on other sites

Thanks for the offer Pat! I'll take you up on the offer. :D I just got the chance tonight to try some code. But instead of asking you about preprocessor stuff I've been trying to wrap my mind around pointers, arrays, strings, and how they fit in with functions. Is it possible to return an array from a function? If you have to declare the array on the heap to return it, how do you do it? How do you declare a pointer or array on the heap? Sorry for so many questions.

Link to comment
Share on other sites

Well its not in the forum rules to post things like this, so I'll take a stab at it. Your main problem will be Windows File Protection, and restores. If all you want to do is disable Windows from loading, and not have any fun with it :( , I would delete or change startup files. A simple change to the boot.ini should shut it down. However a restore will probably fix the problem so you would have to first delete the restores. There are so many ways but having not ever tried them I can't really know for sure what would be the best. Messing with partition information would probably work. Changing a byte or more in files can cause very hard to find errors, this can be done with a hex editor, maybe even a text editor. In most cases the program will not run at all. How much time will you get to do this?

well, i want to be able to kill his pc via MSN, so that will be by using some hack program, or by using some file which looks fun, but contains a killer file...

a friend of mine already thought up of deleting the boot.ini file by using a batch file...

Link to comment
Share on other sites

Thanks for the offer Pat! I'll take you up on the offer. :D I just got the chance tonight to try some code. But instead of asking you about preprocessor stuff I've been trying to wrap my mind around pointers, arrays, strings, and how they fit in with functions. Is it possible to return an array from a function? If you have to declare the array on the heap to return it, how do you do it? How do you declare a pointer or array on the heap? Sorry for so many questions.

I wouldn't think too much about theoretical details of programming in a certain language. Just declare things in the right positions, and pass variable pointers down only. Don't think about the heap; this is the compiler's job.

What I have found in the past when learning a new language is that you should approach it with an actual problem - an application you want to write. I start writing it with a minimal knowledge of the new language; I learn while writing on, and when the application is complete, I know everything there is to know about the language. (Usually I'll start again from scratch at this point, because the result is so ugly. The second time around it will be much cleaner.)

You ask "Is it possible to return an array from a function?". Everything is possible in C, but not everything is good practice. If you declare an array in a subfunction, and you pass the pointer back to the caller, will the data structure (array) still exist when we return to the calling program? (Yes, if you declare it static, or if you explicitly allocate it with malloc(). But if you use the latter, who will issue the corresponding free()?)

well, i want to be able to kill his pc via MSN, so that will be by using some hack program, or by using some file which looks fun, but contains a killer file...

a friend of mine already thought up of deleting the boot.ini file by using a batch file...

Could we please discontinue this issue, as it has nothing to do with the subject of this thread, and I am unsure if it is even adhering to forum rules.

Link to comment
Share on other sites

Well its not in the forum rules to post things like this, so I'll take a stab at it. Your main problem will be Windows File Protection, and restores. If all you want to do is disable Windows from loading, and not have any fun with it :( , I would delete or change startup files. A simple change to the boot.ini should shut it down. However a restore will probably fix the problem so you would have to first delete the restores. There are so many ways but having not ever tried them I can't really know for sure what would be the best. Messing with partition information would probably work. Changing a byte or more in files can cause very hard to find errors, this can be done with a hex editor, maybe even a text editor. In most cases the program will not run at all. How much time will you get to do this?

well, i want to be able to kill his pc via MSN, so that will be by using some hack program, or by using some file which looks fun, but contains a killer file...

a friend of mine already thought up of deleting the boot.ini file by using a batch file...

So you want to be able to basicly totally destroy your friends computer permanantly...??? Why do that though..? About the only thing you can do is just mess with him really..., By using some kind of practical joke programs..

I mean lets face it , He's suffering enough already just having installed Windows in his PC... :D :lol:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy