Click here to Skip to main content
15,566,691 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Create a Makefile from this mess Pin
Richard MacCutchan8-Oct-22 6:57
mveRichard MacCutchan8-Oct-22 6:57 
GeneralRe: Create a Makefile from this mess Pin
pkfox8-Oct-22 7:17
professionalpkfox8-Oct-22 7:17 
AnswerRe: Create a Makefile from this mess Pin
k505413-Oct-22 6:53
mvek505413-Oct-22 6:53 
GeneralRe: Create a Makefile from this mess Pin
pkfox13-Oct-22 22:40
professionalpkfox13-Oct-22 22:40 
GeneralRe: Create a Makefile from this mess Pin
k505414-Oct-22 5:13
mvek505414-Oct-22 5:13 
QuestionIs this array of 2D vectors? Pin
Sk. Azraf Sami7-Oct-22 21:32
Sk. Azraf Sami7-Oct-22 21:32 
AnswerRe: Is this array of 2D vectors? Pin
Richard MacCutchan7-Oct-22 22:35
mveRichard MacCutchan7-Oct-22 22:35 
QuestionStyle question Pin
Mircea Neacsu3-Oct-22 16:33
Mircea Neacsu3-Oct-22 16:33 
I have a C++ function that takes as argument an iterator and needs to increment it without passing the end of the container. I can write it as:
variant A:
C++
bool func (std::string::iterator& ptr, std::string& container)
{
  //...
  if (ptr != container.end())
    //do stuff
}
and call it as:
C++
func (s.begin(), s);

or I could write it as
variant B:
C++
bool func (std::string::interator& ptr, std::string::const_iterator& limit)
{
  //...
  if (ptr != limit)
    //do stuff
}
and call it as:
C++
func (s.begin(), s.end());

(the example assumes the container is a string but that's not important)

Which one would you favor?
Mircea

AnswerRe: Style question Pin
Graham Breach3-Oct-22 22:23
Graham Breach3-Oct-22 22:23 
GeneralRe: Style question Pin
Mircea Neacsu4-Oct-22 3:27
Mircea Neacsu4-Oct-22 3:27 
AnswerRe: Style question Pin
CPallini4-Oct-22 0:47
mveCPallini4-Oct-22 0:47 
GeneralRe: Style question Pin
Mircea Neacsu4-Oct-22 3:28
Mircea Neacsu4-Oct-22 3:28 
GeneralRe: Style question Pin
CPallini7-Oct-22 2:35
mveCPallini7-Oct-22 2:35 
AnswerRe: Style question Pin
BernardIE53177-Oct-22 4:14
BernardIE53177-Oct-22 4:14 
GeneralRe: Style question Pin
Mircea Neacsu7-Oct-22 4:18
Mircea Neacsu7-Oct-22 4:18 
GeneralRe: Style question Pin
BernardIE53177-Oct-22 4:27
BernardIE53177-Oct-22 4:27 
GeneralRe: Style question Pin
Mircea Neacsu7-Oct-22 4:40
Mircea Neacsu7-Oct-22 4:40 
Question'System': a namespace with this name does not exist Pin
Kevin Marois3-Oct-22 7:12
professionalKevin Marois3-Oct-22 7:12 
AnswerRe: 'System': a namespace with this name does not exist Pin
Richard MacCutchan3-Oct-22 7:26
mveRichard MacCutchan3-Oct-22 7:26 
GeneralRe: 'System': a namespace with this name does not exist Pin
Kevin Marois3-Oct-22 7:30
professionalKevin Marois3-Oct-22 7:30 
GeneralRe: 'System': a namespace with this name does not exist Pin
Richard MacCutchan3-Oct-22 7:39
mveRichard MacCutchan3-Oct-22 7:39 
GeneralRe: 'System': a namespace with this name does not exist Pin
Kevin Marois3-Oct-22 7:43
professionalKevin Marois3-Oct-22 7:43 
GeneralRe: 'System': a namespace with this name does not exist Pin
Richard MacCutchan3-Oct-22 7:50
mveRichard MacCutchan3-Oct-22 7:50 
GeneralRe: 'System': a namespace with this name does not exist Pin
Kevin Marois3-Oct-22 7:51
professionalKevin Marois3-Oct-22 7:51 
QuestionList assertation failure Pin
ForNow2-Oct-22 16:50
ForNow2-Oct-22 16:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.