Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Help with either Code::Blocks or Visual Studio 2010
New Posts  All Forums:Forum Nav:

Help with either Code::Blocks or Visual Studio 2010

post #1 of 7
Thread Starter 
I am looking for an addon that will keep track of stuff that I use, mainly variables. It is really annoying to have to scroll to the top of the code where our teacher wants all of the variables for the whole program to be listed. I like Code::Blocks better than Visual studios but our teacher requires Visual Studios, so I write the code on one, and copy and paste it to the other. But does any one know of an add on and can link me to it, that will keep track of declared variables for me off to the side?

I have tried Visual Assistant X and It only kept track of my #include libraries... not my variables. Plus I am hoping for something that is cheaper than $99 a year. Preferably free.
    
CPUMotherboardGraphicsRAM
2600K Sandy Bridge 5+Ghz ASUS P8P67 DELUXE x2 EVGA GTX 580 Water Cooled in SLI G.SKILL Ripjaws X Series 16GB 1600 
OSMonitorPowerCase
Duel Boot, Win 7 & Unbuntu 2 x 24in monitors Plus a 1080p projector CORSAIR Professional Series Corsair 600T 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
2600K Sandy Bridge 5+Ghz ASUS P8P67 DELUXE x2 EVGA GTX 580 Water Cooled in SLI G.SKILL Ripjaws X Series 16GB 1600 
OSMonitorPowerCase
Duel Boot, Win 7 & Unbuntu 2 x 24in monitors Plus a 1080p projector CORSAIR Professional Series Corsair 600T 
  hide details  
Reply
post #2 of 7
Thread Starter 
No one has anything???
    
CPUMotherboardGraphicsRAM
2600K Sandy Bridge 5+Ghz ASUS P8P67 DELUXE x2 EVGA GTX 580 Water Cooled in SLI G.SKILL Ripjaws X Series 16GB 1600 
OSMonitorPowerCase
Duel Boot, Win 7 & Unbuntu 2 x 24in monitors Plus a 1080p projector CORSAIR Professional Series Corsair 600T 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
2600K Sandy Bridge 5+Ghz ASUS P8P67 DELUXE x2 EVGA GTX 580 Water Cooled in SLI G.SKILL Ripjaws X Series 16GB 1600 
OSMonitorPowerCase
Duel Boot, Win 7 & Unbuntu 2 x 24in monitors Plus a 1080p projector CORSAIR Professional Series Corsair 600T 
  hide details  
Reply
post #3 of 7
What do you mean by keep having to scroll to the top? Why do you need to see the variable definitions?
    
CPUMotherboardGraphicsGraphics
FX-8350 Asus Crosshair V MSI GTX460 Hawk 1gb MSI GTX460 Hawk 1gb 
RAMHard DriveHard DriveHard Drive
Kingston HyperX 8gb (2x4gb) Crucial M4 64GB Samsung F3 1TB Western Digital 320GB 
CoolingOSMonitorMonitor
Custom WC Windows 7 Ultimate X64 Dell E2311H Dell E2311H 
MonitorKeyboardPowerCase
LH 23EN43 Ducky Year of the Dragon 2012 SilverStone Strider 1000W-P Corsair 800D 
Audio
Asus Xonar Essence STX 
  hide details  
Reply
    
CPUMotherboardGraphicsGraphics
FX-8350 Asus Crosshair V MSI GTX460 Hawk 1gb MSI GTX460 Hawk 1gb 
RAMHard DriveHard DriveHard Drive
Kingston HyperX 8gb (2x4gb) Crucial M4 64GB Samsung F3 1TB Western Digital 320GB 
CoolingOSMonitorMonitor
Custom WC Windows 7 Ultimate X64 Dell E2311H Dell E2311H 
MonitorKeyboardPowerCase
LH 23EN43 Ducky Year of the Dragon 2012 SilverStone Strider 1000W-P Corsair 800D 
Audio
Asus Xonar Essence STX 
  hide details  
Reply
post #4 of 7
Thread Starter 
Our teacher makes us declare our variables right after main() so it looks like this.

int main ()
{

//DECLARATIONS
ofstream fout;
ifstream fin;
int .....,
....,
....,
double ....,
....,
....;
char ....;

//REST OF PROGRAM - MOST OF THE TIME OFF SCREEN FROM VARIABLES.
So I keep having to scroll up to verify what I named the variables.
}

some of the programs I have to make only use like 4 -10 variables, which is no problem, but when I make programs that have 20+ variables its hard to keep track of what was named what.
    
CPUMotherboardGraphicsRAM
2600K Sandy Bridge 5+Ghz ASUS P8P67 DELUXE x2 EVGA GTX 580 Water Cooled in SLI G.SKILL Ripjaws X Series 16GB 1600 
OSMonitorPowerCase
Duel Boot, Win 7 & Unbuntu 2 x 24in monitors Plus a 1080p projector CORSAIR Professional Series Corsair 600T 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
2600K Sandy Bridge 5+Ghz ASUS P8P67 DELUXE x2 EVGA GTX 580 Water Cooled in SLI G.SKILL Ripjaws X Series 16GB 1600 
OSMonitorPowerCase
Duel Boot, Win 7 & Unbuntu 2 x 24in monitors Plus a 1080p projector CORSAIR Professional Series Corsair 600T 
  hide details  
Reply
post #5 of 7
Quote:
Originally Posted by KingAroan;15531302 
Our teacher makes us declare our variables right after main() so it looks like this.

int main ()
{

//DECLARATIONS
ofstream fout;
ifstream fin;
int .....,
....,
....,
double ....,
....,
....;
char ....;

//REST OF PROGRAM - MOST OF THE TIME OFF SCREEN FROM VARIABLES.
So I keep having to scroll up to verify what I named the variables.
}

some of the programs I have to make only use like 4 -10 variables, which is no problem, but when I make programs that have 20+ variables its hard to keep track of what was named what.

Rework the code to include fewer global variables? They're a pain to keep track of, and messier to debug. Stick to passing by value when possible.
    
CPUMotherboardGraphicsRAM
Xeon E5645 Asus Rampage II Gene eVGA GTX460 SSC 3x4GB Corsair Dominator PC3-12800 
Hard DriveHard DriveHard DriveOS
Crucial C300 64GB Seagate Momentus XT 750 Western Digital GP 2TB EARS Windows 7 Premium 
MonitorKeyboardPowerCase
Asus VE278Q DSI SMK-88 Seasonic X-660 Lian Li U6B 2011 SE 
MouseMouse Pad
Logitech G500 KAI.g3 HIEN - HARD 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Xeon E5645 Asus Rampage II Gene eVGA GTX460 SSC 3x4GB Corsair Dominator PC3-12800 
Hard DriveHard DriveHard DriveOS
Crucial C300 64GB Seagate Momentus XT 750 Western Digital GP 2TB EARS Windows 7 Premium 
MonitorKeyboardPowerCase
Asus VE278Q DSI SMK-88 Seasonic X-660 Lian Li U6B 2011 SE 
MouseMouse Pad
Logitech G500 KAI.g3 HIEN - HARD 
  hide details  
Reply
post #6 of 7
Well you could allow VS2010 Intellisense to autocomplete your list of variables. Using a descriptive naming scheme helps as well. For example using a prefix to define variable type would help quickly determine information about your variable. For example I use s for all strings. Than if you use a descriptive name you know what its doing. Something like sUserName is fairly difficult to forget what type it is and its purpose. By the time you type sUs intellisense will probably have picked up what it is. Thats the easiest solution and promotes good coding practice.

Edit: Another Option
In VB.NET at least you can do xml style comments above a class level variable such as follows
Code:
  '''<summary>
  ''' This is an integer
  '''</summary>
  Dim x As Integer

than when you type x and intellisense picks it up "This is an integer" will be display as a description

Edit (again): Option 3
I know ive already edited a few times buttttt I keep thinking of other things you could try. In Visual Studio go to View -> Other Windows -> Class View this will bring up a window (probably on the right hand side). Drop down until you see the name of the class you want to view the class variables for and click it. At the top of the box that came up ou should see a little piece of paper looking thing with a check mark (when you mouse over it says "Class View Settings") click on that and than uncheck "Show Inherited Members", "Show Base Types", "Show Project References". This should give you a list of all the class level variables and methods in the class you are looking at.
Edited by ByteMyASCII - 11/1/11 at 11:05am
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II x4 955 ASUS Crosshair 3 EVGA 465GTX 1GB 8GB DDR3 1600mhz GSkill/ADATA 
Hard DriveOSMonitorKeyboard
40GB Intel SSD 1TB Western Digital Black Edition Windows 7 x64 Pro Dual 21.5 Sceptre Saitek Eclipse 
PowerCaseMouseMouse Pad
850watt Silverstone Element Coolermaster Haf 932 Razer Lachesis Razer Vespula 
  hide details  
Reply
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II x4 955 ASUS Crosshair 3 EVGA 465GTX 1GB 8GB DDR3 1600mhz GSkill/ADATA 
Hard DriveOSMonitorKeyboard
40GB Intel SSD 1TB Western Digital Black Edition Windows 7 x64 Pro Dual 21.5 Sceptre Saitek Eclipse 
PowerCaseMouseMouse Pad
850watt Silverstone Element Coolermaster Haf 932 Razer Lachesis Razer Vespula 
  hide details  
Reply
post #7 of 7
Thread Starter 
Thanks for the help yall, our teacher today, started to allow us to use different functions for our programs, so that should help for now with having less variables located in one spot. Thanks for the help with the naming convention ill start using that.
    
CPUMotherboardGraphicsRAM
2600K Sandy Bridge 5+Ghz ASUS P8P67 DELUXE x2 EVGA GTX 580 Water Cooled in SLI G.SKILL Ripjaws X Series 16GB 1600 
OSMonitorPowerCase
Duel Boot, Win 7 & Unbuntu 2 x 24in monitors Plus a 1080p projector CORSAIR Professional Series Corsair 600T 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
2600K Sandy Bridge 5+Ghz ASUS P8P67 DELUXE x2 EVGA GTX 580 Water Cooled in SLI G.SKILL Ripjaws X Series 16GB 1600 
OSMonitorPowerCase
Duel Boot, Win 7 & Unbuntu 2 x 24in monitors Plus a 1080p projector CORSAIR Professional Series Corsair 600T 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Help with either Code::Blocks or Visual Studio 2010