Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Fix my program

Reply
Thread Tools

Fix my program

 
 
Nomen Nescio
Guest
Posts: n/a
 
      03-05-2008
Hello, for an assignment I need to protect my files with a
password. Can anyone please tell me why my C/C++ program is
not working?!!

void main() {
char password[40];
fflush(stdin);
password = gets(NULL);
if (password != "november13") {
10 PRINT "INVALID PASSWORD"
20 BEEP
30 GOTO 10
}
}

Thank you for fixing my program! Also please do not tell
anyone the password, it is copywrited.

-- Nth Complexity --
-- Have A Nice Day! --
"However, these criteria, admirable as they are, are insufficient
for a *liberatory* postmodern science: they liberate human beings
from the tyranny of 'absolute truth' and 'objective reality', but
not necessarily from the tyranny of other human beings. In Andrew
Ross' words, we need a science 'that will be publicly answerable
and of some service to progressive interests.'" -- A.D.S.

 
Reply With Quote
 
 
 
 
santosh
Guest
Posts: n/a
 
      03-05-2008
Nomen Nescio wrote:

> Hello, for an assignment I need to protect my files with a
> password. Can anyone please tell me why my C/C++ program is
> not working?!!
>
> void main() {
> char password[40];
> fflush(stdin);
> password = gets(NULL);
> if (password != "november13") {
> 10 PRINT "INVALID PASSWORD"
> 20 BEEP
> 30 GOTO 10
> }
> }
>
> Thank you for fixing my program! Also please do not tell
> anyone the password, it is copywrited.


What a lame troll attempt.

<snip>

 
Reply With Quote
 
 
 
 
Richard Heathfield
Guest
Posts: n/a
 
      03-05-2008
Nomen Nescio said:

> Hello, for an assignment I need to protect my files with a
> password. Can anyone please tell me why my C/C++ program is
> not working?!!
>
> void main() {
> char password[40];
> fflush(stdin);
> password = gets(NULL);
> if (password != "november13") {
> 10 PRINT "INVALID PASSWORD"
> 20 BEEP
> 30 GOTO 10
> }
> }


The problem here is that you're using = for assignment. Try := instead, and
you should find that it works just fine. Don't forget to check the "MFC
Support" box in your gcc Makefile before invoking your JCL.

> Thank you for fixing my program! Also please do not tell
> anyone the password, it is copywrited.


Your secret is safe with me, I promise.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
 
Reply With Quote
 
Roger Dodger
Guest
Posts: n/a
 
      03-05-2008
santosh wrote:
> Nomen Nescio wrote:
>
>> Hello, for an assignment I need to protect my files with a
>> password. Can anyone please tell me why my C/C++ program is
>> not working?!!
>>
>> void main() {
>> char password[40];
>> fflush(stdin);
>> password = gets(NULL);
>> if (password != "november13") {
>> 10 PRINT "INVALID PASSWORD"
>> 20 BEEP
>> 30 GOTO 10
>> }
>> }
>>
>> Thank you for fixing my program! Also please do not tell
>> anyone the password, it is copywrited.

>
> What a lame troll attempt.
>
> <snip>
>


Oh, now, now.
I'm sure your mother used to tell you
that if you can't say anything nice,
just keep your ****ing mouth shut, dumbass.
Am I right, or what?


 
Reply With Quote
 
rossum
Guest
Posts: n/a
 
      03-05-2008
On Wed, 5 Mar 2008 09:20:15 +0100 (CET), Nomen Nescio
<(E-Mail Removed)> wrote:

>Hello, for an assignment I need to protect my files with a
>password. Can anyone please tell me why my C/C++ program is
>not working?!!
>
>void main() {
> char password[40];
> fflush(stdin);
> password = gets(NULL);
> if (password != "november13") {

You need to hide your password here. Better to use:
if ((password + 1) != "november14") {

> 10 PRINT "INVALID PASSWORD"
> 20 BEEP
> 30 GOTO 10
> }
>}
>
>Thank you for fixing my program! Also please do not tell
>anyone the password, it is copywrited.
>
> -- Nth Complexity --
> -- Have A Nice Day! --
>"However, these criteria, admirable as they are, are insufficient
>for a *liberatory* postmodern science: they liberate human beings
>from the tyranny of 'absolute truth' and 'objective reality', but
>not necessarily from the tyranny of other human beings. In Andrew
>Ross' words, we need a science 'that will be publicly answerable
>and of some service to progressive interests.'" -- A.D.S.


 
Reply With Quote
 
Joachim Schmitz
Guest
Posts: n/a
 
      03-05-2008
Roger Dodger wrote:
> santosh wrote:
>> Nomen Nescio wrote:
>>
>>> Hello, for an assignment I need to protect my files with a
>>> password. Can anyone please tell me why my C/C++ program is
>>> not working?!!
>>>
>>> void main() {
>>> char password[40];
>>> fflush(stdin);
>>> password = gets(NULL);
>>> if (password != "november13") {
>>> 10 PRINT "INVALID PASSWORD"
>>> 20 BEEP
>>> 30 GOTO 10
>>> }
>>> }
>>>
>>> Thank you for fixing my program! Also please do not tell
>>> anyone the password, it is copywrited.

>>
>> What a lame troll attempt.
>>
>> <snip>
>>

>
> Oh, now, now.
> I'm sure your mother used to tell you
> that if you can't say anything nice,
> just keep your ****ing mouth shut, dumbass.

How about taking yout own advice?

PLONK


 
Reply With Quote
 
santosh
Guest
Posts: n/a
 
      03-05-2008
Roger Dodger wrote:

> santosh wrote:
>> Nomen Nescio wrote:
>>
>>> Hello, for an assignment I need to protect my files with a
>>> password. Can anyone please tell me why my C/C++ program is
>>> not working?!!
>>>
>>> void main() {
>>> char password[40];
>>> fflush(stdin);
>>> password = gets(NULL);
>>> if (password != "november13") {
>>> 10 PRINT "INVALID PASSWORD"
>>> 20 BEEP
>>> 30 GOTO 10
>>> }
>>> }
>>>
>>> Thank you for fixing my program! Also please do not tell
>>> anyone the password, it is copywrited.

>>
>> What a lame troll attempt.
>>
>> <snip>


<snip even lamer expletives>

Is that the best you can do little troll? You leave the trolling to
Kenny and disappear back to where you emerged from. At least he has
*some* humour and sarcasm.

 
Reply With Quote
 
Roger Dodger
Guest
Posts: n/a
 
      03-05-2008
Joachim Schmitz wrote:

>>>

>> Oh, now, now.
>> I'm sure your mother used to tell you
>> that if you can't say anything nice,
>> just keep your ****ing mouth shut, dumbass.

> How about taking yout own advice?
>
> PLONK
>
>


Hey go **** yourself dickhead.
I wasn't even talking to you.
And you misspelled 'your',
you illiterate little bug****er.
Eat **** and die.

 
Reply With Quote
 
Roger Dodger
Guest
Posts: n/a
 
      03-05-2008
santosh wrote:
> Roger Dodger wrote:
>
>> santosh wrote:
>>> Nomen Nescio wrote:
>>>
>>>> Hello, for an assignment I need to protect my files with a
>>>> password. Can anyone please tell me why my C/C++ program is
>>>> not working?!!
>>>>
>>>> void main() {
>>>> char password[40];
>>>> fflush(stdin);
>>>> password = gets(NULL);
>>>> if (password != "november13") {
>>>> 10 PRINT "INVALID PASSWORD"
>>>> 20 BEEP
>>>> 30 GOTO 10
>>>> }
>>>> }
>>>>
>>>> Thank you for fixing my program! Also please do not tell
>>>> anyone the password, it is copywrited.
>>> What a lame troll attempt.
>>>
>>> <snip>

>
> <snip even lamer expletives>
>
> Is that the best you can do little troll? You leave the trolling to
> Kenny and disappear back to where you emerged from. At least he has
> *some* humour and sarcasm.
>


You talk real big when you're invisible.
I *know* you wouldn't talk like that if we were face to face.
And as long as we both know that,
you can say whatever the **** you want to say.
 
Reply With Quote
 
Richard Heathfield
Guest
Posts: n/a
 
      03-05-2008
Roger Dodger said:

<snip>

> You talk real big when you're invisible.


Given that your email address is for a domain - brooklyn.ny - that doesn't
exist, you're being hypocritical. Although santosh uses a gmail address,
it is at least a valid address[1]. What's more, santosh contributes
constructively to this group, and you don't. Why not fix that, by helping
out with people's C questions? Or shall we just add you to the list of
snide, parasitic morons in our killfiles?

[1] Yes, I know my own address headers are invalid, but my sig contains
instructions for building my address that no bright person will have any
difficulty in following (which hasn't stopped it foxing a few non-bright
people).

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FIX] Another possible fix for the missing ASP .Net tab problem Patrick Philippot ASP .Net 0 04-14-2006 11:48 AM
Xah's Edu Corner: The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee Perl Misc 21 03-21-2006 07:02 AM
Xah's Edu Corner: The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee Python 23 03-21-2006 07:02 AM
Xah's Edu Corner: The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee Java 22 03-21-2006 07:02 AM
why browser cache setting affects program behavior? Fix? =?Utf-8?B?anVubGlh?= ASP .Net 2 05-20-2005 06:27 PM



Advertisments