microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.58k stars 29.03k forks source link

Calculation is not being done in higher datatype for cpp code #193747

Closed amanc8423 closed 1 year ago

amanc8423 commented 1 year ago

Type: Bug

in .cpp file just cout<<5/2.0; It's answer shoulde be 2.5 but in vs code it is showing 2 which is wrong.

VS Code version: Code 1.82.2 (abd2f3db4bdb28f9e95536dfa84d8479f1eb312d, 2023-09-14T05:55:25.390Z) OS version: Windows_NT x64 10.0.19045 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz (4 x 2304)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|7.90GB (1.29GB free)| |Process Argv|C:\\Users\\dell\\Desktop\\D --crash-reporter-id 8ac51244-69d0-49d5-8323-8dee75c6270b| |Screen Reader|no| |VM|67%|
Extensions (18) Extension|Author (truncated)|Version ---|---|--- vscode-tailwindcss|bra|0.10.0 bracket-pair-toggler|dzh|0.0.3 chatgpt-gpt4-gpt3-vscode|Eas|1.1.8 auto-rename-tag|for|0.1.10 code-runner|for|0.12.0 c-cpp-runner|fra|8.1.0 vscode-pull-request-github|Git|0.73.2023091209 vscode-language-babel|mgm|0.0.39 cmake-tools|ms-|1.15.31 cpptools|ms-|1.17.5 cpptools-extension-pack|ms-|1.3.0 vscode-thunder-client|ran|2.12.1 LiveServer|rit|5.7.9 es7-react-js-snippets|rod|1.9.3 cmake|twx|0.0.17 vscode-lldb|vad|1.10.0 vscode-icons|vsc|12.5.0 JavaScriptSnippets|xab|1.8.0 (2 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vsdfh931cf:30280410 vshan820:30294714 vstes263:30335439 vscoreces:30445986 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 pythonvs932:30410667 py29gd2263cf:30792227 vsclangdc:30486549 c4g48928:30535728 dsvsc012:30540252 pynewext54:30695312 azure-dev_surveyone:30548225 3biah626:30602489 89544117:30613380 2i9eh265:30646982 showlangstatbar:30737416 03d35959:30757346 pythonfmttext:30731395 fixshowwlkth:30771522 showindicator:30805244 pythongtdpath:30769146 i26e3531:30792625 pythonnosmt12:30797651 pythonidxpt:30805730 pythonnoceb:30805159 copilotsettingc:30839828 synctok:30821570 dsvsc013:30795093 dsvsc014:30804076 diffeditorv2:30821572 dsvsc015cf:30829746 ```
gjsjohnmurray commented 1 year ago

/question

vscodenpa commented 1 year ago

We closed this issue because it is a question about using VS Code rather than an issue or feature request. Please search for help on StackOverflow, where the community has already answered thousands of similar questions. You may find their guide on asking a new question helpful if your question has not already been asked. See also our issue reporting guidelines.

Happy Coding!