/offtopic
I used to be VBS nerd and made a lot of vbs scripts that helped me in my daily life.
One example is a vb-script that saves a picture with one press of a (logitech G15 macro-)key.
But now with the coming of Windows 7 and the disappearance of VBS overall, I need to learn C++.
/offtopic
This brings me to a problem in the source code.
I could post all files you need to create my program, but that's a bit clumsy, so I'll just give the relevant pieces of code and the includes I used.
The errorneous line is marked with stars for your convenience.
#include <windows.h> #include <stdio.h> #include <cstring> #include <iostream> #include <fstream> #include "InputBox.h" //you probably don't have this file. string s = result2; int countVowels(char result2[]); { int count = 0, k = 0; while (result2[k] != '\0'); { if (result2[k] == '\\'); { count++; } k++; } return count; } int i = 0; (line 108)******** for (i < count);******** ( i++; int position = s.find("\\"); s.replace(position, 1, "\\\\"); }
Error messages:
108 F:\%path%\CInputBoxTest.cpp invalid operands of types `int' and `<unknown type>' to binary `operator<'
108 F:\%path%\CInputBoxTest.cpp expected `;' before ')' token
110 F:\%path%\CInputBoxTest.cpp expected `)' before ';' token
111 F:\%path%\CInputBoxTest.cpp expected primary-expression before "int"
111 F:\%path%\CInputBoxTest.cpp expected `)' before "int"
I understand I can't use < or any other >=! for comparing the two integers, but what do I use?
If you need more code, just ask me, I'll then add the .h and full .cpp.
***UPDATE after writing***
Whilst writing this (or typing, whatever), I googled across GetNumbers and GetBig... I might get into that, but if somebody has a solution to my initial problem, I'll be glad to hear it.
TIA & greet - I/O-Error