MSVC++ 6 scripts?

Started by
15 comments, last by Useful 21 years, 10 months ago
quote:Original post by Useful
Im aware that I can create a generic class and I use the function, but it doesnt help me at all past that. Once I'm done creating the interface for a class, I have to go into the source and rewrite(basiclly) all the same stuff into source.


Well, once you do that, go to the class view, right click on the class and go "Add Function", or "Add Variable", or something like that...

codeka.com - Just click it.

[edited by - Dean Harding on June 8, 2002 7:52:22 PM]
Advertisement
You could write a Developer Studio macro

The redundancy is partly to ensure backwards compatibility with C and partly because it makes for quicker compile times. An IDE could do it for you, in theory, providing you don''t mind it making arbitrary decisions about where you want it to be initialised.

Lastly, you should be able to initialise it in the header if it''s static const. Some compilers don''t allow this though. In some cases, you may be able to use an enum instead for the same effect.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files ]
I only provided this as sort of an example of what I wanted. Another example would be code autoformatting. Having an option that recognized that you were lazy and didnt tab your variables/defines to align each other.

We have templates for our programs, why cant we have code templates? Things like these are enforced in the work world when you code to make things more readable to others. MS Word does simple stuff like this when your write a document.

I''d love to make something like this for visual studio, now I have to ask how? If I can''t, I''ll have to do it with TextPad or some other IDE, or write my own IDE(which doesnt seem a good choice).
quote:Original post by Useful
Having an option that recognized that you were lazy and didnt tab your variables/defines to align each other.


How about an option that recognized that you were lazy and locked you out from the compiler until you actually wanted to put some effort into what you were doing?

Or maybe you''d like an option that made your game for you?

Or surely at least one that took away such tedious tasks as dividing your code into functions, or making sure your variables were the right type?
quote:Original post by Anonymous Poster
How about an option that recognized that you were lazy and locked you out from the compiler until you actually wanted to put some effort into what you were doing?

Or maybe you'd like an option that made your game for you?

Or surely at least one that took away such tedious tasks as dividing your code into functions, or making sure your variables were the right type?


And I bet you put all your format your code by hitting tab a few times after every line. Im talking about extending the autoformating, thats no different than the ide automaticly indenting my code.

[edited by - useful on June 9, 2002 12:59:07 PM]
Useful, did you try the class wizard stuff I mentioned? It does pretty much what you were asking...

codeka.com - Just click it.
quote:
class Foo{static float bar;};
float Foo::bar = 5.0f;

Is there any way to program stuff like this in?


nop, why should vc++ produce bugs ? never tried constructors ?


T2k

[edited by - T2k on June 10, 2002 9:12:00 AM]

This topic is closed to new replies.

Advertisement