Ask a Question related to UNIX Programming, Design and Development.
-
Steven #1
[C++] About coding style
It is expected that each line of program is not beyond 80 columns.
However, in my programs, many lines is longer than 80 columns, so I may
need to split them.
Question1:
I offen use "\" to split a line, for example, I split this below:
original:
if (FunctionName1(..,..,FunctionName2(...,...,...))) {
splited:
if (FunctionName1(..,.., \
FunctionName2(...,...,...))) \
{
The problem is that because I use Doxygen to generate documents
automatically, and Doxygen cannot deal with the "\" character, then I am
unable to get the function references correctly.
The question acturally is: is "\" necessary? If it is not, why may C
sources use it?
Question2:
Many function defination is longer than 80 columns, so I need to split
them this way:
original:
int ClassName1::FunctionName1(DataType1 Parameter1, DataType2 Parameter2)
{
....
}
int ClassName1::FunctionName1(DataType2 Parameter1, DataType2 Parameter2)
{
....
}
splited:
int ClassName1::FunctionName1(
DataType1 Parameter1,
DataType2 Parameter2)
{
....
}
int ClassName1::FunctionName1(
DataType2 Parameter1,
DataType2 Parameter2)
{
....
}
In this way, I previous thought I was doing the best because no matter
how many parameters are used, it is declared very clearly.
The problem is: In C++ if I have overloaded functions, which is of the
same name, appears the same in the first line. I use "ctags" to generate
function tags for vim so that I can easily go to the defination or
declaration of functions, however, "ctags" uses the first line of the
function to make tags and for overloaded functions I will get only one
tag.
The question is that how can I deal with it? Would anyone give me some
suggestions?
Thank you very much!
--
Steven Ding
Steven Guest
-
help in coding
Hi, I want to build up interactive tutorials that has videos and audios, I want to show some images with voice comments on them, pleeeeeeeease... -
Need help with Style conversion from Style object to Style key/value collection.
I am writing a custom control that derives from the DataGrid control. I would like to apply SelectedItemStyles and ItemStyles for use in my derived... -
coding
Hi Gang, I am a Director programmer and do a little Flash. I've noticed some pretty complex coding in Flash and have searched diligently for... -
Lil fun be4 coding
http://www.stud.ntnu.no/~shane/stasj/div_bilder/107.html Have a nice day ! -- Julien CROUZET -
Number format German style => English style when importing CSV files into MySQL-DB
Hi there, I'm trying to import a csv file into my MySQL database. Unfortunately the number format for the price column is formatted in German...



Reply With Quote

