Thread: How do I assign an array to a set of GtkWidget * in C?

  1. #16
    Registered User
    Join Date
    Apr 2020
    Posts
    11

    Stupid!

    Quote Originally Posted by laserlight View Post
    Not your code snippets; the result you observed given the code snippet. After all, it was this unexpected result that led you here, and indeed given the logic expressed by your code snippet, what you observed does sound impossible.
    And it is.

    I made two stupid mistakes:

    1) I got my globals wrong and defined them as static in main.c rather than in gui/guiglb.c with extern definitions in gui/guiglb.h. How I made that mistake is unfathomable - tired old brain, I suppose.
    2) I assumed that I had put a breakpoint after the assignment loop, but what I actually did was put it elsewhere. The program stopped because I had added --g-fatal-warnings to the gdb command.

    The basic problem was that the flentry[] was supposed to be a global, but wasn't. So when it went out of context... poof!

    Fixed now

    Thanks for all your help (including john.c, but if you weren't so aggressive I might have taken more notice. For God's sake, lighten up.)

    And my apologies for having wasted your time on my stupidity.

  2. #17
    Registered User
    Join Date
    Dec 2017
    Posts
    1,633
    Quote Originally Posted by clancyj4 View Post
    For God's sake, lighten up.
    You are the one who became instantly snarky to someone just trying to help.
    You are the one who started swearing when I mentioned a well-known fact.

    You are not even remotely special.
    We've seen your kind a hundred times.
    "I have a magical bug!"
    "I've done everything correctly; don't dare say I didn't!"
    "It must be the compiler!"
    A little inaccuracy saves tons of explanation. - H.H. Munro

  3. #18
    Registered User
    Join Date
    Apr 2020
    Posts
    11
    Quote Originally Posted by john.c View Post
    You are the one who became instantly snarky to someone just trying to help.
    You are the one who started swearing when I mentioned a well-known fact.

    You are not even remotely special.
    We've seen your kind a hundred times.
    "I have a magical bug!"
    "I've done everything correctly; don't dare say I didn't!"
    "It must be the compiler!"
    Normally, I wouldn't respond to this type of rant, but for the last time:

    You are not even remotely special. True - never thought any different.
    We've seen your kind a hundred times. Err - possibly, but see below.
    "I have a magical bug!". Well, it was magical to me which is why I was asking for help.
    "I've done everything correctly; don't dare say I didn't!". I thought I made it plain that I was at a complete loss and that anything I had done was up for question.
    "It must be the compiler!" I rapidly discounted that possibility and it was clutching at straws, anyway.

    Your attitude started out as rather aggressive and rapidly descended to outright abuse. I really don't understand you. Maybe you have anger management issues?

    In any event, don't bother to reply to this as I have put you on my ignore list

  4. #19
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    Closed now.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. assign values 2d array to normal array
    By Gertjan Haan in forum C Programming
    Replies: 1
    Last Post: 10-29-2015, 11:10 PM
  2. assign string to int array
    By lilostitch382 in forum C++ Programming
    Replies: 10
    Last Post: 02-22-2010, 06:48 PM
  3. Assign array to another.
    By boblettoj99 in forum C Programming
    Replies: 8
    Last Post: 12-03-2009, 04:32 PM
  4. how to assign value in two -dimensional array?
    By zcrself in forum C Programming
    Replies: 7
    Last Post: 11-26-2009, 11:00 PM
  5. assign value of pointer array
    By zcrself in forum C Programming
    Replies: 12
    Last Post: 08-17-2009, 02:12 PM

Tags for this Thread