Click here to Skip to main content
15,848,724 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: State Machine to C code and back Pin
kalberts22-Jan-21 0:31
kalberts22-Jan-21 0:31 
GeneralRe: State Machine to C code and back Pin
Greg Utas22-Jan-21 2:30
professionalGreg Utas22-Jan-21 2:30 
QuestionMessage Closed Pin
12-Jan-21 12:59
Member 1496877112-Jan-21 12:59 
AnswerRe: C++ template function returning "vector" ? Pin
Greg Utas12-Jan-21 13:24
professionalGreg Utas12-Jan-21 13:24 
AnswerRe: C++ template function returning "vector" ? Pin
CPallini12-Jan-21 22:20
mveCPallini12-Jan-21 22:20 
GeneralMessage Closed Pin
13-Jan-21 5:57
Member 1496877113-Jan-21 5:57 
GeneralRe: C++ template function returning "vector" ? Pin
Richard MacCutchan13-Jan-21 6:40
mveRichard MacCutchan13-Jan-21 6:40 
GeneralRe: C++ template function returning "vector" ? Pin
CPallini13-Jan-21 8:05
mveCPallini13-Jan-21 8:05 
Quote:
That would not work in my function which retrieves unknown "size" of (string) data.
That's not a problem.
It would work as well. Try, for instance
C++
#include <iostream>
#include <vector>

using namespace std;


vector <int> get_a_fresh_vector_with_unknown_size()
{
  vector <int> v;
  int N = rand() % 128;

  for (int n = 0; n < N; ++n)
    v.push_back( rand() );

  return v;
}


int main()
{
  auto v =  get_a_fresh_vector_with_unknown_size();
  for (auto x : v)
    cout << x << " ";
  cout << endl;
}

"In testa che avete, Signor di Ceprano?"
-- Rigoletto

QuestionCCombox Pin
JM225111-Jan-21 21:19
JM225111-Jan-21 21:19 
AnswerRe: CCombox Pin
Richard MacCutchan11-Jan-21 23:41
mveRichard MacCutchan11-Jan-21 23:41 
QuestionCMFCRibbonComboBox Pin
Member 1325158811-Jan-21 17:31
Member 1325158811-Jan-21 17:31 
AnswerRe: CMFCRibbonComboBox Pin
Richard MacCutchan11-Jan-21 23:39
mveRichard MacCutchan11-Jan-21 23:39 
GeneralRe: CMFCRibbonComboBox Pin
Member 1325158812-Jan-21 10:18
Member 1325158812-Jan-21 10:18 
GeneralRe: CMFCRibbonComboBox Pin
Victor Nijegorodov12-Jan-21 11:12
Victor Nijegorodov12-Jan-21 11:12 
GeneralRe: CMFCRibbonComboBox Pin
Member 1325158812-Jan-21 17:23
Member 1325158812-Jan-21 17:23 
GeneralRe: CMFCRibbonComboBox Pin
Victor Nijegorodov12-Jan-21 22:07
Victor Nijegorodov12-Jan-21 22:07 
GeneralRe: CMFCRibbonComboBox Pin
Richard MacCutchan12-Jan-21 22:24
mveRichard MacCutchan12-Jan-21 22:24 
QuestionC Programming code to build an echo varient that hopefully can be used in WinXP Pin
jackngill11-Jan-21 11:49
jackngill11-Jan-21 11:49 
QuestionRe: C Programming code to build an echo varient that hopefully can be used in WinXP Pin
David Crow11-Jan-21 17:36
David Crow11-Jan-21 17:36 
AnswerRe: C Programming code to build an echo varient that hopefully can be used in WinXP Pin
jackngill11-Jan-21 23:25
jackngill11-Jan-21 23:25 
AnswerRe: C Programming code to build an echo varient that hopefully can be used in WinXP Pin
Richard MacCutchan11-Jan-21 23:36
mveRichard MacCutchan11-Jan-21 23:36 
GeneralRe: C Programming code to build an echo varient that hopefully can be used in WinXP Pin
jackngill11-Jan-21 23:58
jackngill11-Jan-21 23:58 
GeneralRe: C Programming code to build an echo varient that hopefully can be used in WinXP Pin
Richard MacCutchan12-Jan-21 0:09
mveRichard MacCutchan12-Jan-21 0:09 
GeneralRe: C Programming code to build an echo varient that hopefully can be used in WinXP Pin
jackngill12-Jan-21 0:15
jackngill12-Jan-21 0:15 
GeneralRe: C Programming code to build an echo varient that hopefully can be used in WinXP Pin
Richard MacCutchan12-Jan-21 0:55
mveRichard MacCutchan12-Jan-21 0:55 

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.