Click here to Skip to main content
15,922,145 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionState Machine to C code and back Pin
NelsonGoncalves14-Jan-21 0:30
NelsonGoncalves14-Jan-21 0:30 
AnswerRe: State Machine to C code and back Pin
Richard Andrew x6418-Jan-21 12:11
professionalRichard Andrew x6418-Jan-21 12:11 
GeneralRe: State Machine to C code and back Pin
NelsonGoncalves18-Jan-21 23:09
NelsonGoncalves18-Jan-21 23:09 
AnswerRe: State Machine to C code and back Pin
trønderen20-Jan-21 9:29
trønderen20-Jan-21 9:29 
GeneralRe: State Machine to C code and back Pin
NelsonGoncalves21-Jan-21 21:17
NelsonGoncalves21-Jan-21 21:17 
GeneralRe: State Machine to C code and back Pin
kalberts21-Jan-21 23:31
kalberts21-Jan-21 23:31 
GeneralRe: State Machine to C code and back Pin
Greg Utas22-Jan-21 1:30
professionalGreg Utas22-Jan-21 1:30 
QuestionMessage Closed Pin
12-Jan-21 11:59
Member 1496877112-Jan-21 11:59 
AnswerRe: C++ template function returning "vector" ? Pin
Greg Utas12-Jan-21 12:24
professionalGreg Utas12-Jan-21 12:24 
AnswerRe: C++ template function returning "vector" ? Pin
CPallini12-Jan-21 21:20
mveCPallini12-Jan-21 21:20 
GeneralMessage Closed Pin
13-Jan-21 4:57
Member 1496877113-Jan-21 4:57 
GeneralRe: C++ template function returning "vector" ? Pin
Richard MacCutchan13-Jan-21 5:40
mveRichard MacCutchan13-Jan-21 5:40 
GeneralRe: C++ template function returning "vector" ? Pin
CPallini13-Jan-21 7:05
mveCPallini13-Jan-21 7:05 
QuestionCCombox Pin
JM225111-Jan-21 20:19
JM225111-Jan-21 20:19 
AnswerRe: CCombox Pin
Richard MacCutchan11-Jan-21 22:41
mveRichard MacCutchan11-Jan-21 22:41 
QuestionCMFCRibbonComboBox Pin
Member 1325158811-Jan-21 16:31
Member 1325158811-Jan-21 16:31 
AnswerRe: CMFCRibbonComboBox Pin
Richard MacCutchan11-Jan-21 22:39
mveRichard MacCutchan11-Jan-21 22:39 
GeneralRe: CMFCRibbonComboBox Pin
Member 1325158812-Jan-21 9:18
Member 1325158812-Jan-21 9:18 
GeneralRe: CMFCRibbonComboBox Pin
Victor Nijegorodov12-Jan-21 10:12
Victor Nijegorodov12-Jan-21 10:12 
GeneralRe: CMFCRibbonComboBox Pin
Member 1325158812-Jan-21 16:23
Member 1325158812-Jan-21 16:23 
GeneralRe: CMFCRibbonComboBox Pin
Victor Nijegorodov12-Jan-21 21:07
Victor Nijegorodov12-Jan-21 21:07 
GeneralRe: CMFCRibbonComboBox Pin
Richard MacCutchan12-Jan-21 21:24
mveRichard MacCutchan12-Jan-21 21:24 
QuestionC Programming code to build an echo varient that hopefully can be used in WinXP Pin
jackngill11-Jan-21 10:49
jackngill11-Jan-21 10:49 
QuestionRe: C Programming code to build an echo varient that hopefully can be used in WinXP Pin
David Crow11-Jan-21 16:36
David Crow11-Jan-21 16:36 
AnswerRe: C Programming code to build an echo varient that hopefully can be used in WinXP Pin
jackngill11-Jan-21 22:25
jackngill11-Jan-21 22:25 
Hi David,

Many thanks for responding to my posting & yes I should of explained with more clarity in respect of my failure. This will be my first program written in "C" I usually write small batch programs in XP and/or sometimes in Win9x. I have found that CMD (although) is very good sometimes I could do with some assistance programs to ease XP's CMD. So I am trying to write small helper programs in "C" to facilitate this, just some background info which may or may not be relevant.

I have been to an online site which compiles my code as a check & a series of errors are reported which lead me to believe my code has errors & is not right I will display the output below from "https://www.onlinegdb.com/online_c_compiler"
The Compilation failed due to following error(s).
main.c:7:1: error: expected identifier or ‘(’ before ‘for’
 for (i = 1; i < argc; i++) {
 ^~~
main.c:7:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
 for (i = 1; i < argc; i++) {
               ^
main.c:7:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘++’ token
 for (i = 1; i < argc; i++) {
                        ^~
main.c: In function ‘echo’:
main.c:29:28: error: ‘STDIN’ undeclared (first use in this function)
     while(fgets(input, 80, STDIN)){  //read from STDIN (aka command-line)
                            ^~~~~
main.c:29:28: note: each undeclared identifier is reported only once for each function it appears in
main.c: At top level:
main.c:38:7: error: expected identifier or ‘(’ before ‘if’
       if (*char == -x) {
       ^~
main.c:42:7: error: expected identifier or ‘(’ before ‘else’
       else
       ^~~~
main.c:47:14: error: unterminated comment
              /* remove carriage returns from one line /*
              ^

I am unclear as to what these errors messages mean really. Hope this gives you a rough idea as to where my failure is. I am concerned also about the structure of my potential program as I am not sure if it is right? any guidance would be appreciated? Also just as a tag-on due to the fact I am writing very small programs could you advise as to a small .com .EXE builder that I could use Please?
Best Regards

modified 12-Jan-21 4:38am.

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.