Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8254211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:06:53+00:00 2026-06-08T01:06:53+00:00

I have global variable maxflow in my gui.c file. I am using GtkAssistant for

  • 0

I have global variable maxflow in my gui.c file. I am using GtkAssistant for multiple windows. On page[5] ,I want to print this value.
Here is portion of my code:

typedef struct {
    GtkWidget *widget;
    gint index;
    const gchar *title;
    GtkAssistantPageType type;
    gboolean complete;
} PageInfo;

PageInfo page[6] = {
    {NULL, -1, "Introduction", GTK_ASSISTANT_PAGE_INTRO, TRUE},
    {NULL, -1, "Projects", GTK_ASSISTANT_PAGE_CONTENT, TRUE},
    {NULL, -1, "Profit For Projects", GTK_ASSISTANT_PAGE_CONTENT, TRUE},
    {NULL, -1, "Prerequisites For Projects", GTK_ASSISTANT_PAGE_CONTENT, TRUE},
    {NULL, -1, "Click the Button", GTK_ASSISTANT_PAGE_PROGRESS, FALSE},
    {NULL, -1, "Confirmation", GTK_ASSISTANT_PAGE_CONFIRM, TRUE},
};

page[5].widget = gtk_label_new("OUTPUT\n" "it is time to leave!");

This is not continuous code first part is structure, then definition of pages,then I have just shown what I am doing on page[5].
Now I want to display this text and value of a global variable on my window,
can any one suggest changes instead of gtk_label_new() what should I use to accomplish my task.
I am very new to gtk.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T01:06:54+00:00Added an answer on June 8, 2026 at 1:06 am

    You could create a string with the value of maxflow using g_snprintf or snprintf or such function and pass that to gtk_label_new. You could try something on these lines:

    char msg[32]={0};
    g_snprintf(msg, sizeof msg, "OUTPUT: maxflow is %d", maxflow);
    page[5].widget = gtk_label_new(msg);
    

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a global variable in my javascript, whose value I want to set
I have this global variable which is used as counter which I want to
If I have a global static variable x like in this code #include <stdio.h>
I have a header file variable.h where i declare all my global variable.Then i
I have a global variable int[] and I want to clear its data and
i have a global variable UIColor *textColor; I am update this variable by the
I have a global variable I called Y_VAL which is initialized to a value
Assume that I have a global variable user in application....like this: # GET /users.xml
For example, I have $theme global variable that is defined in the configuration file,
I have a global variable MyGlobalVar and some code that looks like this: var

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.