Script for separating implementation from headers in a .h file

前端 未结 3 612
南旧
南旧 2020-12-17 00:38

Sometimes, when working with small classes, it\'s a pain in the ass to separate the implementation in a .cpp file, so I put all the code in the header file (kids, don\'t do

3条回答
  •  Happy的楠姐
    2020-12-17 01:21

    It may be more trouble than it is worth but with a programmer's editor such as Epsilon you can write a routine to do that and bind it to any key sequence you like. However, I now make the header up front and use the programmer's editor to jump between them, create the function headers, fill in the class names (from the file name) and generally make my life easier. There is an up-front investment in time though.

提交回复
热议问题