i thought you had in your code the vice versa.Of course he gives no warning or error :)
It is completely ok to write something like this.Well ok for the compiler,not you ;) So what you had there...
Type: Posts; User: std10093
i thought you had in your code the vice versa.Of course he gives no warning or error :)
It is completely ok to write something like this.Well ok for the compiler,not you ;) So what you had there...
The = in the if statement.Explain to me exactly what you did( and show me the code).
sorry for the time that made me to answer :)
I love that you ask :D
barToZip(barCode);
cout << zip << endl;
barToZip returns an int,which is the zip!!!But you did not assign the return value to the zip,so you loose the return...
The problem is here
zip1.getBarCode()
So i follow this function ,which leads me to the zipToBar function where i saw this
for (int i = 4; i >= 0; i++) {
zipArr[i] = zip % 10;
typo.Thanks :) Edited my post :)
Since n is the length of substring as the ref says,you should set the second parameter to 25 and the first to 1 :) (because the first letter is in position zero and then you are going to take the 25...
Take a look at this ref string::substr - C++ Reference
substr takes as second parameter the length of the substring.In your code you use it as
barCode = barCode.substr(1,26);
So you...