I thought that a segfault means that the program tried to read/write memory that it did not allocate.
|
Quote:
:o *opens tabs for cplusplus.com and Wikipedia* EDIT: Actually, Wikipedia lists "attempt to access memory the program does not own" as one of the causes of a segfault, so I guess I was kind of right the first time, but yes, trying to read/write to unallocated memory (or dereferencing it) will do the same thing. :) |
Okay, I've revised it so that gcc doesn't put out any errors/warnings:
Code:
#include <stdlib.h> Code:
mrcode@linuxbox:~/Programs$ gcc askme.c -g -O9 -o askme EDIT: It also segfaults even when no argument is passed (when it should just return normally...?) (Note: I can start a new thread in the Programming forum if need be...I apologize for hijacking this one) |
I read the Wikipedia article, but don't know enough to see where that program is "attempting to access memory the program does not own".
Whatever you're typing now is what you're doing now. So really, it's impossible to hijack this thread. :) |
this thread started with some thing .... going to ..... some where else ....
|
Somewhere else: Belgium
|
Or an alternative universe.
|
Or an alternative dimension.
|
Yes, turn left at the next alternative universe and you'll be in an alternative dimension.
Don't turn right, or you'll fall off the edge. |
In an alternative dimension there are lots of ways to turn other than left or right. Anyway, how do you know
whether Belgium is an alternative dimension? |
I don't believe Belgium exists in any dimension.
|
Quote:
Also, it's: Code:
int main(int argc, char* argv[]) Code:
int main(char* argc[],int argv) Code:
$ cat stuff.c |
1. man gcc FTW
2. -std=c99 -pedantic -Wall -Wextra FTW 3. wrong thread FTW |
I'd say it's telling you what it's doing - it's SEGFAULTing ;)
|
"Can you hear me Segfaulting now"?
Edit: BTW Begin Watching Dog chew leg on antique desk Again |
|
Quote:
Waiting for a Public Citizen Webinar that starts at 12 noon EST |
Quote:
Code:
int main(int argc,char* argv[]) Anyways, I'll go ahead and shut up about it now; it's working, and there's no reason I should be hijacking the thread anymore. (I know how to pass arguments now! :D) |
You may also want to change "strcmp" to "strcmpi" so it is not case sensitive.
|
Quote:
What I am doing now: being honest and an arsehole :P |
Quote:
But seriously, I know it's nothing to shout about...I'm mainly just doing it for the practice (you could say I'm still a programming n00b). What I'm doing now: trying to get the program to work... |
Quote:
|
Thinking...
|
I don't know what "arshole" means so I'm not thinking... just typing...
|
it's missing an "e".
|
That reminds me that, many years ago, when I worked for an internaional bank, I was lucky enough never to get posted to 'our Seoul' branch.
|
So it's earshole! Thanks Brian... hmmm... thinking now...
|
Hahaha...yes...that's right.
|
I spelled it correctly, check my post. It's not my fault people try to spread LIES about what I said.
|
You mean post #120, with this:
Last edited by carbonfiber; Today at 09:50 PM.. |
I think we will have to call in jeremy - to ascertain exactly what was changed by carbonfiber at 9.50 Grenitch Me'ning Time (what was he thinking) - this is after all the "What are you doing now" not the "what werw you doing 15 minutes ago" thread!
|
Well.
|
I would have gotten away with it too if it weren't for you meddling brianL.
|
:D:D:D
|
Going to watch "The Cell" on TV.
|
Just browsing through LQ
|
Waiting for this threads natural death ...
|
Quote:
|
No it isn't .. I just check and now is now and your post was your now, not my now.
This is the thread that never ends, it just goes on and on my friends ... because 'now' is something of a moving target. |
Quote:
|
I am foolishly trying to divide by 0. One day I will be successful!!!!! It will work, and I know it will have worked because the fabric of space will tear, and all that we know will suddenly...
|
Quote:
|
Quote:
OSHI-! You've killed us all! :p |
Trying to login to mozilla's horrifically broken website to report that an addon (clickweather, 1.1.9, https://addons.mozilla.org/en-US/firefox/addon/1035 and read the reviews) bricked my brower. Going back to an old version isn't possible because their mask out the old versions with some sort of "don't let the user install this" code. 1.1.8 worked here 5 minutes ago, now I'm told it "won't work with my version". No prob., I'll leave a note for the developer. That requires signing up. Their registration process chases its own tail and goes in "type what you see" circles, then they finish by mailing from a user "nobody". How does "nobody" send mail? This is also the default user of a compromised Apache install, so lots and lots of spam/phish also comes from "nobody". Registration attempt #1 killed by junk mail rules. Attempt #2 to gmail since I'm not letting my own mailserver drop trousers just to accomodate mozilla.org's bad mail practices. As it turns out, even with successful registration, you can't login, even with cookies, javascript, java, and the kitchen sink enabled. Keep clicking "login" and you'll end back at .... login or register. Thus, there's no way to tell the developer that his extension is flopping and users and abandoning it like a sinking ship. His "contact" link sends you to weather.com, where you might be able to guess there's no real contact email, only....drum roll please.... more broken Javascript web registration code! I give up. clickweather axed. I'm sending Firefox to the fur coat factory.
This is a dream, right? A nightmare - someone wake me! |
Quote:
Can't say much other than there some arsehole out there F****** with people. I guess I can say I hope whatever happens you get it worked out all right. |
Quote:
|
rotfl
|
And lo, I acquiescently exclaim, my "Google!" paraphernalia from afar, whilst said illusion of subjugated mediocracy was consummated in an elicit explicit harrowing abend inadvertently kindling exasperation until the culmination of incontrovertible and irrevocable affirmation of plenary cessation by reason of precarious overture when undertaking rather bourgeois video and flash entertainment. Quotidian avocation shall envisage consistent, stable efficacy.
Man, I am bored. |
Quote:
|
Quote:
So... I was happily browsing Youtube... And lo, I acquiescently exclaim, my "Google!" paraphernalia from afar, whilst said illusion of subjugated mediocracy was consummated in an elicit explicit harrowing abend inadvertently kindling exasperation until the culmination of incontrovertible and irrevocable affirmation of plenary cessation by reason of precarious overture when undertaking rather bourgeois video and flash entertainment. Quotidian avocation shall envisage consistent, stable efficacy. Dang. |
All times are GMT -5. The time now is 06:19 AM. |