Trí
Hello everyone, I need to know the error of this post, someone help me
ㅤㅤㅤㅤㅤ
#include<stdio.h> int main(){ float a[ ] = { 13.24, 1.5, 1.5, 5.4, 3.5 } ; float *j ; j = a ; j = j + 4 ; printf ( "\n%d %d %d", j, *j, a[4] ) ; return 0; }
Trí
Thanks.
ㅤㅤㅤㅤㅤ
check it out?
Trí
still can't
ㅤㅤㅤㅤㅤ
#include<stdio.h> int main(){ float a[ ] = { 13.24, 1.5, 1.5, 5.4, 3.5 } ; float *j ; j = a ; j = j + 4 ; printf ( "\n%f %f %f", j, *j, a[4] ) ; return 0; }
ㅤㅤㅤㅤㅤ
still can't
Check it out??????
Subhajit
int main() { // Complete the code. int a; cin>>a; long b; cin>>b; char c; cin>>c; float d; cin>>d; double e; cin>>e; cout<<a<<endl; cout<<b<<endl; cout<<c<<endl; cout<<d<<endl; cout<<e<<endl; return 0; }
Subhajit
458873627 37274594125879112 g -79720.555 7441739.542437971
Subhajit
why this input failing?
Subhajit
images not allowed here?
Dima
no, read the rules
klimi
why this input failing?
it works without problem
Subhajit
In hackerrank it works with custom input but by submitting it shows wrong answer
Subhajit
Pic not allowed so i can't show
klimi
Pic not allowed so i can't show
there wouldn't be more information either way, try reading the hackerrank the exercise one more time if you haven't overlooked something
Subhajit
There are 4 test cases
Subhajit
I put all the value one by one in custom input. It worked
Subhajit
But when i submit it shows wrong answer
Dima
Wtf why warn limit is 3
klimi
Wtf why warn limit is 3
cuz this is not offtopic
Subhajit
Warn for asking for help ?
klimi
Warn for asking for help ?
No, for ignoring rules and crossposting everywhere (offtopic is not meant for asking C/C++ questions)
Anurag
But when i submit it shows wrong answer
Sure about the display formatting?
Subhajit
Sure about the display formatting?
It's not printing all the decimal values
Subhajit
One of member said to use setprecision
Subhajit
Long was right It's about the last floating values
Harsh
Hi
Anurag
Does that problem specify the number of digits after decimal?
Subhajit
Getting error that setprecision is not declared in this scope
Anurag
import <iomanip> use cout << setprecision(number of significant digits asked) << d << endl;
Subhajit
@subhajitlucky
I copied his code it worked
Subhajit
But i typed exact same code
Subhajit
It didn't work
Anurag
Must have made a mistake...check
Subhajit
I have taken ss it's exact same
MiniApple
how to read C++ template error?
Pavel
how to read C++ template error?
I usually search where the error starts mentioning the line where the template code was called from, and start reading from that line (I think it's usually up from that line)
MiniApple
ty
M
Hi guys
M
I'm a newbie, I just started learning C++ And I need help
M
#include "SSDL.h" What is this? And why there was an error when I wanted to run it?
M
delete it
That was, REALLY helpful thank you
MiniApple
how to especify the c++ version using g++
MiniApple
without cmake, just on command line
MiniApple
ty
Sarmat
Hello, c++ coders. I am beginner in clear c++, recently i wrote only on Unreal Engine's C++ framework and a little on standart c++ library. I have a question. Is visual studio code good code redactor for c++? Is it friendly with CMake, and other C++ tools?
ʌᴉɹʇnɐl ɹǝɐlᴉʇʎ
#res
Anno
Can guys recommand some books about multi-thread programming?
Anonymous
Gheorghe
Hi guys, can you help my please with a probleme?Create the Integer class. Numbers must be in the range -128 to 128 . In case of exiting the tuning fork, display the error message. Overload the ++ operator as a member function and -- as a friend function. Overload the operator + as a member function and - as a friend function. To overload as member functions the operators and >> (adding and subtracting from the integer a given number of units) C++
Gheorghe
I dont know how do it
DaviChan
I dont know how do it
Where are you stuck? What have you tried?
Gheorghe
#include <iostream> #include<cstdlib> #include <time.h> #include <math.h> using namespace std; class Intreg { int x; public: Intreg (int xx;) { x=xx if (xx>-128 && xx<128 ) return true; return cout<<"Eroare"<<endl; } void Afisare() {cout<<xx<<endl;} Intreg operator++(Intreg xx) {Intreg s; s.x=xx.x+1; return s;}
Gheorghe
I think the program I wrote is wrong
Pavel
you did not include main
I think main is the least of the issues in this code if it's an issue at all :)
Yeerriinn_
Hi, does anyone know what c compiler is available for ipad?
Yeerriinn_
I mean apps
Anno
I mean apps
SSH could be a better choice
Anno
connect remote server and compile anything you want
Anonymous
is there anyone that worked with json in c ?
Anonymous
i need some help
Anonymous
how should I read a json file
Jonathan
why not open ur compiler and try
Anno
debug it