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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:49:08+00:00 2026-05-21T03:49:08+00:00

I am loading matrix from file and here comes the question, how to treat

  • 0

I am loading matrix from file and here comes the question, how to treat if there will be fault in loading file if there will be letter instead of number? I am especially asking – how to determine, that I loaded letter?

Thx

  • 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-05-21T03:49:09+00:00Added an answer on May 21, 2026 at 3:49 am

    If the input read by fscanf() does not match the expected type (as determined by the conversion specifier), this will be reported by the return value of fscanf() (which is equal to the number of coversion specifiers successfully read).

    int x;   
    if ( fscanf( file, "%d", &x ) != 1 )
    {
        // input was not a number
    }
    

    More generally speaking, the whole scanf() family of functions is primarily aimed at reading whitespace-separated, trivial data. Usually it is more easy and reliable to read in a complete line (using fgets()), and then doing the parsing internally. (strtol() and strtod() can be of help here, but strtok() should be used with care, especially in a multithreaded environment.)

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

Sidebar

Related Questions

while loading getfptex(got it from CTAN) batch file ,when i'm extracting this batch file
EDIT: To fix mistake in covariance matrix Cross posted from here Ok so I
I'm having trouble efficiently loading data into a sparse matrix format in R. Here
trouble loading html file from plist to webView using following code in FAQDetailViewController.m: -
I use this code for loading matrix: FILE *inputMatrix=fopen(file,r); fscanf(inputMatrix,%d,&num); for(i=0;i<num;++i){ for(j=0;j<num+1;++j){ fscanf(inputMatrix,%f,&A[i][j]); }
Try loading this normal .jpg file in Internet Explorer 6.0. I get an error
I'm having troubles loading a numpy matrix. I successfully saved it to disk through:
I'm loading the image from the url by using LoadImage method and storing it
I´m loading data from MySQL DB into Java application. How to define column type?
When loading Mootools More from my server, Android Stock Browser (froyo 2.2 and gingerbread

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.