The Repository

The author has learned the hard way that trying to solve a problem that she has solved before while forgetting how she'd solved the problem and how painful it was solving it, meant reliving the pain. So she figured it'd be a good idea to record her findings.

Monday, September 7, 2015

[C++] scanf thinks a float is double

C++ promotes float as double. 

warning: format ‘%f’ expects argument of type ‘float*’, but argument 2 has type ‘double’ [-Wformat=]
  scanf("%f",rad); // rad is declared as float

So, apply the following fix (it has worked and it should work again):
scanf("%f", &rad)

>>found the solution here<<
Posted by hamora at 5:27 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Set the Default Directory on Terminal (UBuntu)

Click Here!
Posted by hamora at 4:44 AM 1 comment:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: Directory, Terminal, UBuntu

Reset Password of Root (UBuntu)

Click Here!
Posted by hamora at 1:56 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

About Me

My photo
hamora
20-something trying to get through life.
View my complete profile

Blog Archive

  • ►  2018 (3)
    • ►  December (2)
    • ►  March (1)
  • ►  2017 (7)
    • ►  October (1)
    • ►  September (1)
    • ►  February (3)
    • ►  January (2)
  • ►  2016 (2)
    • ►  December (1)
    • ►  February (1)
  • ▼  2015 (12)
    • ►  October (6)
    • ▼  September (3)
      • [C++] scanf thinks a float is double
      • Set the Default Directory on Terminal (UBuntu)
      • Reset Password of Root (UBuntu)
    • ►  August (2)
    • ►  July (1)
Ethereal theme. Powered by Blogger.