Click here to Skip to main content
15,886,422 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Are there programmers that are currently using machine code and Assembly? Pin
CPallini13-Jan-19 21:26
mveCPallini13-Jan-19 21:26 
AnswerRe: Are there programmers that are currently using machine code and Assembly? Pin
Joe Woodbury14-Jan-19 6:25
professionalJoe Woodbury14-Jan-19 6:25 
JokeRe: Are there programmers that are currently using machine code and Assembly? Pin
Quantum Robin14-Jan-19 13:52
Quantum Robin14-Jan-19 13:52 
Questionerror: expected identifier before string constant Pin
Vaclav_13-Jan-19 6:28
Vaclav_13-Jan-19 6:28 
AnswerRe: error: expected identifier before string constant Pin
Richard MacCutchan13-Jan-19 6:49
mveRichard MacCutchan13-Jan-19 6:49 
GeneralRe: error: expected identifier before string constant Pin
Vaclav_13-Jan-19 7:21
Vaclav_13-Jan-19 7:21 
GeneralRe: error: expected identifier before string constant Pin
Richard MacCutchan13-Jan-19 22:29
mveRichard MacCutchan13-Jan-19 22:29 
GeneralRe: error: expected identifier before string constant Pin
Stefan_Lang16-Jan-19 23:28
Stefan_Lang16-Jan-19 23:28 
C++
CLASS_I2CIO(char Device, int Address);


Surely you mean char* Device, not char Device?

If the erroneous line is supposed to be an initialization of a variable calling this constructor, then that is not going to work: you can not initialize a member variable right inside the class declaration, unless it is static. Instead you have to do the initialization inside the constructor, like this:

C++
class C_VNA {
   C_VNA();
   ...
   CLASS_I2CIO   i2c_ads1115_test; // just declaring the type of the member variable here
};
...
// constructors
// initialize the class members here (only needed when not using default constructor)
C_VNA::C_VNA()
 : i2c_ads1115_test(DEVICE_I2C,ADDRESS_ADS) 
{
   // more initialization code
}

[edit2]reintroduced tags [/edit]

modified 17-Jan-19 7:28am.

GeneralRe: error: expected identifier before string constant Pin
Richard MacCutchan16-Jan-19 23:56
mveRichard MacCutchan16-Jan-19 23:56 
GeneralRe: error: expected identifier before string constant Pin
Stefan_Lang17-Jan-19 1:30
Stefan_Lang17-Jan-19 1:30 
AnswerRe: error: expected identifier before string constant Pin
k505413-Jan-19 8:29
mvek505413-Jan-19 8:29 
AnswerRe: error: expected identifier before string constant Pin
Graham Breach13-Jan-19 23:21
Graham Breach13-Jan-19 23:21 
GeneralRe: error: expected identifier before string constant Pin
Vaclav_14-Jan-19 3:33
Vaclav_14-Jan-19 3:33 
GeneralRe: error: expected identifier before string constant Pin
Graham Breach14-Jan-19 4:33
Graham Breach14-Jan-19 4:33 
AnswerRe: error: expected identifier before string constant Pin
Stefan_Lang16-Jan-19 22:38
Stefan_Lang16-Jan-19 22:38 
GeneralRe: error: expected identifier before string constant Pin
Vaclav_19-Jan-19 18:31
Vaclav_19-Jan-19 18:31 
Question(C) Robust code Should an unsigned int array index be tested for "< 0" Pin
HS_C_Student11-Jan-19 3:27
HS_C_Student11-Jan-19 3:27 
AnswerRe: (C) Robust code Should an unsigned int array index be tested for "< 0" Pin
CPallini11-Jan-19 5:25
mveCPallini11-Jan-19 5:25 
GeneralRe: (C) Robust code Should an unsigned int array index be tested for "< 0" Pin
Bram van Kampen12-Jan-19 14:29
Bram van Kampen12-Jan-19 14:29 
SuggestionRe: (C) Robust code Should an unsigned int array index be tested for "< 0" Pin
David Crow11-Jan-19 5:40
David Crow11-Jan-19 5:40 
GeneralRe: (C) Robust code Should an unsigned int array index be tested for "< 0" Pin
HS_C_Student11-Jan-19 7:17
HS_C_Student11-Jan-19 7:17 
GeneralRe: (C) Robust code Should an unsigned int array index be tested for "< 0" Pin
David Crow11-Jan-19 7:33
David Crow11-Jan-19 7:33 
GeneralRe: (C) Robust code Should an unsigned int array index be tested for "< 0" Pin
Joe Woodbury11-Jan-19 11:54
professionalJoe Woodbury11-Jan-19 11:54 
GeneralRe: (C) Robust code Should an unsigned int array index be tested for "< 0" Pin
HS_C_Student11-Jan-19 12:18
HS_C_Student11-Jan-19 12:18 
GeneralRe: (C) Robust code Should an unsigned int array index be tested for "< 0" Pin
leon de boer12-Jan-19 3:36
leon de boer12-Jan-19 3:36 

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.