Thread: Adjacency matrix, please modify my code

  1. #1
    Registered User
    Join Date
    Sep 2012
    Posts
    13

    Adjacency matrix, please modify my code

    Soved......... Finally

    Thanks for not helping guys...
    I learn the hard way
    Last edited by enakta13; 09-26-2012 at 09:06 PM. Reason: solved

  2. #2
    Registered User ledow's Avatar
    Join Date
    Dec 2011
    Posts
    435
    Or, to put it another way, you learned the way that most of us learned.

    25+ years ago when I was learning programming, not only was there no Internet to jump on to splat out queries to, but nobody I knew programmed either. My CS teacher (actually, both of them!) had *ME* take my own A-Level programming class because I knew more because I'd sat and read a book and tried and failed and tried and failed and tried and failed and then learned.

    There were no forums to hop onto (well, there were, but we couldn't afford the modem or the phone call costs!). There were no cheap programming books available (they were either textbooks and thus textbook prices or baby-level programming tutorials published in monthly magazines, one page a month). There was nobody to ring up, email, moan to about them not helping me. Sometimes there wasn't even a computer available to try things out on (we had one ZX Spectrum in the family and that was used for games more than anything else). I had to learn, on my own, like everyone else.

    I do find these forums amazing in the amount of people who jump in, pose sometimes difficult-to-understand and incomplete problems, no code of their own (or horrendously indecipherable code), and then stamp their feet until people help or, in your case, moan about the lack of help from unpaid volunteers after you solved the problem on your own. Seriously, if it was that easy to solve, maybe you could have just done it in the first place and not had a little tantrum afterwards?

    It really makes me wonder what these people will do in, say, a workplace environment, or a university degree (if they haven't already been dumbed down horrendously) and are posed with a problem that they CAN'T get solved by just writing on the Internet and hoping someone knows and is willing to spend the time to explain to them for free.

    Guess what made you learn more about programming adjacency matrices than ANYTHING ELSE? You having to solve a problem on your own. Congratulations. Welcome to education that doesn't involve primary-school hand-holding.

    Nobody minds you asking for help. But the only person who can actually ANSWER the problem you have is you. We can merely point you in the right direction and spot your mistakes. Looks like this time, your direction is self-education, and your mistake would have been relying solely on an Internet forum to solve your problem for you (rectified the second you got off your backside, by the way).

    - Compiler warnings are like "Bridge Out Ahead" warnings. DON'T just ignore them.
    - A compiler error is something SO stupid that the compiler genuinely can't carry on with its job. A compiler warning is the compiler saying "Well, that's bloody stupid but if you WANT to ignore me..." and carrying on.
    - The best debugging tool in the world is a bunch of printf()'s for everything important around the bits you think might be wrong.

  3. #3
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    Quote Originally Posted by ledow View Post
    I do find these forums amazing in the amount of people who jump in, pose sometimes difficult-to-understand and incomplete problems, no code of their own (or horrendously indecipherable code), and then stamp their feet until people help or, in your case, moan about the lack of help from unpaid volunteers after you solved the problem on your own. Seriously, if it was that easy to solve, maybe you could have just done it in the first place and not had a little tantrum afterwards?

    It really makes me wonder what these people will do in, say, a workplace environment, or a university degree (if they haven't already been dumbed down horrendously) and are posed with a problem that they CAN'T get solved by just writing on the Internet and hoping someone knows and is willing to spend the time to explain to them for free.
    I find that this is true for many other things in life nowadays, not just programming assignments. Over pampering seems to be the rule of thumb, which is very sad. Then again you get some lucky breakaways like the OP who probably learned more through this experience of discovery than any individual programming assignment could have possible taught him.
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. adjacency matrix!
    By enakta13 in forum C Programming
    Replies: 4
    Last Post: 09-26-2012, 10:48 AM
  2. help modify code 6 x 24 to 10 x 24 led matrix
    By visualfx in forum C++ Programming
    Replies: 5
    Last Post: 09-05-2012, 02:04 PM
  3. adjacency matrix and sparse matrix
    By dpp in forum C Programming
    Replies: 3
    Last Post: 07-11-2010, 10:26 AM
  4. Replies: 1
    Last Post: 11-06-2008, 11:50 PM
  5. adjacency matrix
    By Smiley0101 in forum C++ Programming
    Replies: 4
    Last Post: 03-12-2003, 09:17 PM