Visual Studio quick code

This is a discussion on Visual Studio quick code within the C++ Programming forums, part of the General Programming Boards category; I'm programming Visual Studio. Do you know there is a plug-in that I could write a quick test code to ...

  1. #1
    Registered User
    Join Date
    Feb 2004
    Posts
    9

    Visual Studio quick code

    I'm programming Visual Studio. Do you know there is a plug-in that I could write a quick test code to verify things instead of putting a debug message in a large project?
    For example:
    I want to get sizeof(int)

  2. #2
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,211
    No idea what you're asking for. If you want to find the size of an int, then why not use sizeof(int)? What are you trying to do?

  3. #3
    Registered User
    Join Date
    Feb 2004
    Posts
    9
    I mean, for example you are in a large project. You dont' want to put a small snippet codes (utilities) to test there (Ex: find maximum of 2 numbers) to see if it works flawlessly before you use it. Instead, you realize creating a new project in Visual Studio to test back and forth is much better. However, creating a new project requires to go many steps, so I wonder there is any plugin that I just put a code there, it will output something.

  4. #4
    Registered User
    Join Date
    Oct 2006
    Location
    Canada
    Posts
    1,243
    i understand what your asking. since every C++ program starts with main, why not just put your test code at the very beginning of main and after your few test lines of code have 'return 0' to finish?

    sorry dont know of any plugin and im sure youve probably already thought of this.

    i think i vaguely recall seeing a feature like this when i was on slackware running KDE which came with a KDE-based IDE--not positive though.

    edit: i think it was KDevelop. im sure you wouldnt change OS's just for a feature like this, hopefully there exists something thatll work for your situation now.
    Last edited by nadroj; 08-13-2007 at 06:18 PM.

  5. #5
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    I keep around a console project that I put my test code in. I just have to remember to put code I want to keep in a new project. Otherwise, I erase all the contents every time I want to test something else.

    I'm sure you can create templates for VS as well, if you want to have a skeleton project (e.g. for setting up an OpenGL Window or something like that)
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  6. #6
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Posts
    907
    That's the standard practice, I think: "Stick it in some hodgepodge console laboratory."
    "If you tell the truth, you don't have to remember anything"
    -Mark Twain

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem Compiling Program
    By wco5002 in forum C++ Programming
    Replies: 13
    Last Post: 11-06-2007, 11:56 AM
  2. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 09:43 AM
  3. Errors with including winsock 2 lib
    By gamingdl'er in forum C++ Programming
    Replies: 3
    Last Post: 12-05-2005, 07:13 PM
  4. odd errors from msvc std library files
    By blight2c in forum C++ Programming
    Replies: 6
    Last Post: 04-30-2002, 12:06 AM
  5. <list>
    By Unregistered in forum C++ Programming
    Replies: 9
    Last Post: 02-24-2002, 03:07 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21