|
Programming and Assembly Language Please read this Topic's rules!! |
![]() |
| LinkBack | Thread Tools | Rate Thread |
| ||||
Is this the 'Gates has had something to do with it' principal? Do you use Windows (not the holes in the wall type either)? Well gates made some of that. Even if you play games not made by MS, they are likely to have made the compiler that the game was compiled with, or the operating system it was compiled on. Almost everything to do with computers today has been made using something the MS made, even the programs used to make programs are 'affected'. A bit over the top but there we have it. If i based everything on principal, i wouldn't have made Re-volt or wouldn't want to be a programmer.
__________________ i7 2600K (4.3Ghz 1.34v) | GTX580 | 16GB (4x4GB) Patriot Viper Sec. 5 Ser. 2 (1866 - 9-11-9-27) | P67A-UD4-B3 Corsair AX1200 | Vertex II 240GB SSD | 4TB RAID0 (Samsung HD204UI) | Logitech G930 Wireless Headset YouTube - Benchmark Results (Coming Soon!) |
| ||||
Quote:
Quote:
|
| ||||
'i know, let's talk about hoinar's 5kg piece of noisy ***** then' ![]() I don't know much about programming, i admit that, but the more you know, the better. As for Java, i won't even touch that as the applications you can make with it, i just don't even like the look of them. Unless you are decent at graphics, then usually, it looks crap. As 'jailbait or mmm' says, that is just wrong. Edit: it buggers up at 69 you say? Well, it just doesn't like your relationship with your girlfriend then ![]()
__________________ i7 2600K (4.3Ghz 1.34v) | GTX580 | 16GB (4x4GB) Patriot Viper Sec. 5 Ser. 2 (1866 - 9-11-9-27) | P67A-UD4-B3 Corsair AX1200 | Vertex II 240GB SSD | 4TB RAID0 (Samsung HD204UI) | Logitech G930 Wireless Headset YouTube - Benchmark Results (Coming Soon!) |
| ||||
Quote:
Nah, im single and have been for ages. It bites. |
| ||||
Quote:
|
| ||||
![]() Quote:
![]() ![]() ![]() Quote:
![]() |
| ||||
Have you checked the include files. Maybe something is in there. There doesn't seem to be anything in your source code as far as i can see.
__________________ i7 2600K (4.3Ghz 1.34v) | GTX580 | 16GB (4x4GB) Patriot Viper Sec. 5 Ser. 2 (1866 - 9-11-9-27) | P67A-UD4-B3 Corsair AX1200 | Vertex II 240GB SSD | 4TB RAID0 (Samsung HD204UI) | Logitech G930 Wireless Headset YouTube - Benchmark Results (Coming Soon!) |
| ||||
Search google for c++ data types. Also if you really despise char arrays you could always get somethign fo rit and include it so you can have string capability from the get go. Though once you get good i would recommend making something of your own to handle string's so you know exactly what is in it. There might already be something you can include for using string's i can' remember. skool hr8 if you want a mildly simple language that isn't over the top and isn't going to majorly bust performance i would recommend a pascal language preferabbly the object pascal language delphi or even visual basic. Even i started with visual basic ![]()
__________________ |
| ||||
Quote:
Code: int main() { char this_is_a_string[128]; printf( "Welcome to AuthentiLog.\nTo initiate the login procedure, please press the enter key.", this_is_a_number ); getchar(); printf( "User number: " ); scanf( "%s", this_is_a_string ); printf( "welcome user number %s.", this_is_a_string ); getchar(); char magic_string[128]; scanf( "%s", &magic_number ); printf( "PassString: ", magic_string ); scanf( "%s", &magic_string ); getchar(); printf( "Thankyou. ", magic_string ); getchar(); char sir_madam[128]; printf( "Please enter verification string: " ); scanf( "%s", sir_madam ); getchar(); printf( "Thankyou.", sir_madam ); getchar(); char number_list_confirm[128]; printf( "Please confirm the entries below are correct. " ); getchar(); printf( "UserNumber: %s. ", this_is_a_string ); getchar(); printf( "PassNumber: %s. ", magic_string ); getchar(); printf( "Verification Number: %s. ", sir_madam ); getchar(); /*--- scanf( "%s", magic_string ); printf( "PassNumber: %s", magic_string ); getchar(); scanf( "%s", sir_madam ); printf( "Verification Number: %s", sir_madam ); getchar(); ---*/ char string_final[128]; //this code is wrong------->printf( "\n", this_is_a_number ); printf("%s\n", this_is_a_string); printf( "Thankyou for using AuthentiLog user number %s.", this_is_a_string ); printf( "\nGoodbye user number %s.", this_is_a_number ); getchar(); } The line I have marked with //this code is wrong----------> contains a syntax error that will allow the application to compile and run, but could result in stack corruption. You are passing an argument to printf, but not actually using it in your format string. This is a common error when using printf, and is one of the reasons that C++ uses the << metaphore instead. |
| ||||
Well, is it possible to put in a very high number, e.g. 999999999 to try and prevent it? Or would that cause errors?
__________________ i7 2600K (4.3Ghz 1.34v) | GTX580 | 16GB (4x4GB) Patriot Viper Sec. 5 Ser. 2 (1866 - 9-11-9-27) | P67A-UD4-B3 Corsair AX1200 | Vertex II 240GB SSD | 4TB RAID0 (Samsung HD204UI) | Logitech G930 Wireless Headset YouTube - Benchmark Results (Coming Soon!) |
| ||||
It's been awhile since i have written any c++ but if their is a function for checking the length of string's/char arrays and hopefully integer values then use it to determine whether it can be stored or not. Basically: If (Length(SomeText) > 15) Then //allow the user to re-input valid data. Otherwise store it and do w/e.
__________________ |
| ||||
Quote:
You have to develop a routine to throw away invalid inputs before they get to the array, or use a different input method.
__________________ It is by coffee alone I set my mind in motion... |
| ||||
what about: Code: if("%s", this_is_a_string > 30)goto "printf", this_is_a_string;
__________________ i7 2600K (4.3Ghz 1.34v) | GTX580 | 16GB (4x4GB) Patriot Viper Sec. 5 Ser. 2 (1866 - 9-11-9-27) | P67A-UD4-B3 Corsair AX1200 | Vertex II 240GB SSD | 4TB RAID0 (Samsung HD204UI) | Logitech G930 Wireless Headset YouTube - Benchmark Results (Coming Soon!) |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Rate This Thread | |
| |
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
linux help required | skool h8r | OS, Software, Firmware, and BIOS | 5 | 31st July, 2006 05:10 AM |
New Athlon Cpu Required | surgeon | AMD Motherboards & CPUs | 15 | 18th November, 2005 05:29 PM |
More mentions required | dod | ThunderRd's AOA FOLDING@HOME Team | 4 | 8th October, 2004 08:47 PM |