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 9318481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T03:08:21+00:00 2026-06-19T03:08:21+00:00

Very raw with C. I’m writing a program that takes files as it’s arguments,

  • 0

Very raw with C. I’m writing a program that takes files as it’s arguments, but this is rather annoying for debugging (GDB). Rather than have to re-type the file list each time that I start off in GDB, I’d rather store the file names in an array and modify the program to read this array rather than the argv[] values.

I started out with

FILE*[5] inpFiles;
inpFiles[0] = &file1.txt;

but this is all wrong. I need to get some sort of reference to each of the input files so that I can get its memory address.

How can I do this? Thanks.

  • 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-19T03:08:22+00:00Added an answer on June 19, 2026 at 3:08 am

    You can define a GDB command in .gdbinit so you don’t need to modify your production code.
    For example, add the following lines in your ~/.gdbinit or .gdbinit in your working directory.

    define do
        run file1.txt file2.txt file3.txt file4.txt file5.txt
    end
    

    Then, in GDB, just type the command do, and GDB runs run file1.txt file2.txt file3.txt file4.txt file5.txt for you.

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

Sidebar

Related Questions

I'm writing a ruby program that need raw cpu power (I know ruby is
Let me preface this by saying that I'm a very raw iPhone developer. I'm
I'm working on an app which takes in a raw binary message (very simple,
This is a very standard newbie question, but I am looking for an expert
The code is very simple. But this is the first thing off this kind
I'm coming back to raw Javascript, and I'm writing classes like this: var Person;
maybe its late or something, but this is freaking me out. Basicly im writing
This may sound very simple and off the track, but any help will be
This is a very noob-ish question but I can't figure it out. I want
I have a very large set of binary files where several thousand raw frames

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.