Ad
  • Custom User Avatar

    I'm not a C++ guy but try printf

  • Custom User Avatar

    I did cout and nothing showed up at all. Am I missing a step somewhere?

  • Custom User Avatar

    Of course you can use print statements. Just write to STDOUT like you would in any other system. For example in JS you would use console.log(foo) or in Ruby you would use puts foo

  • Custom User Avatar

    Can someone explain why you can't use print statements to debug your code on here? There are plenty of websites that do similar things to this website such as hackerrank, leetcode, etc. and it is really easy to just toss in a print statement and view what is going wrong in your code.