Jump to content

JensenEx

Member
  • Posts

    46
  • Joined

  • Last visited

Reputation Activity

  1. Like
    JensenEx reacted to Sauron in Trouble Running C in VS Code   
    Open the extension settings and tick the box that says "Run in Terminal"
  2. Like
    JensenEx reacted to Hi P in Trouble Running C in VS Code   
    Yea it's the gcc compiler, definitely good practice to add it
     
    I followed this answer and worked like a charm
  3. Like
    JensenEx reacted to Hi P in Trouble Running C in VS Code   
    main doesn't require you to explicitly return something, it will compile without it
    edit: could it be that I'm using the gcc compiler? this one doesn't require it
     
    @JensenEx I take it that you want to do it automatically, I honestly don't remember how to do it since I haven't used VSCode in a long time, if you wanna do it manually: gcc -o outputFile sourceFile.c 
  4. Like
    JensenEx reacted to Sauron in Trouble Running C in VS Code   
    Weird, I thought I remembered it not working... I guess it's some compiler magic. Still I'd say it's good practice to explicitly return 0.
  5. Like
    JensenEx reacted to Sauron in Trouble Running C in VS Code   
    Since the main function is of type int you should return an int at the end - just add
    return 0; below the final print statement. Without this it shouldn't compile no matter what.
     
    As for running it in vscode, I just tried it with the "C/C++", "C/C++ Compile Run" and "Code Runner" plugins and it just worked when I clicked on the "run" button in the top right, no need for restarting or anything else.
  6. Like
    JensenEx got a reaction from PCGuy_5960 in Which is better for me ?   
    Thanks a lot for your reply, I've made up my mind to get G402, I'm gettiny it later. 
  7. Like
    JensenEx got a reaction from PCGuy_5960 in Which is better for me ?   
    Oh wow that's cool. ?? 
  8. Like
    JensenEx got a reaction from STRMfrmXMN in Should I flip the Power Supply switch off after I shut down my pc ?   
    Thanks a lot for your PSU whitelist, I have some better idea on what type of PSU to get in the near future, thanks a lot again.
×