TRocket, as you know C++, wound you be helpful enough and explain why this code only writes "9 [tab] 6" if I input an IP beginning with 96.?
#include "CustomHostsGenerator.h" using namespace std; int main ( ) { char c; char v; cout<<"Please input your desired IP."<<endl; cout<<"i.e.: 192.168.0.1"<<endl; cin>>c; cout<<endl; cout<<"Now insert your desired hostname."<<endl; cout<<"ie.: 192.168.0.1 would be router.int"<<endl; cin>>v; cout<<endl; ofstream file; file.open("C:\\Windows\\System32\\drivers\\etc\\hosts", ios_base::app); file<<c<<" "<<v; file.close( ); cout<<"Wrote "<<c<<" "<<v<<" to the hosts file. Enjoy!"; system("PAUSE"); return 0; };
Also, if you want to know what "CustomHostsGenerator.h" contains; it's only this:
#include <iostream> #include <fstream>
Last edited by DigiTechs (2012-10-24 13:36:49)
Offline
change line 5 to
char *c = new char;
and line 6 to
char *v = new char;
you had initialized c and v as single characters so, only one character could be read and the rest of the input overflowed into the next cin(which also only read one character).
I think that's right, It worked when i ran it just now, but i'm not really that good at C++
Last edited by TRocket (2012-10-24 14:19:56)
Offline
Ok. I'll try that
EDIT: Thanks! It worked!
Also, I changed line 18 so it's this, to not make too much things on one line.
file<<endl<<c<<" "<<v;
So basically, it moves a line down BEFORE adding any text in.
Last edited by DigiTechs (2012-10-24 14:52:17)
Offline
TRocket wrote:
If you want to help Develop please tell me your Github username!
If you are still looking for developers/testers, let me know how I can help.
Offline
@MathWizz LargePositiveIntegers and LargeNegativeIntegers are variable-length:
getBigInt: anObject id: classID
| digitCount result |
digitCount _ stream uint16.
result _ (self classForID: classID) new: digitCount.
1 to: digitCount do: [:i | result digitAt: i put: stream next].
^ result
putBigInt: anObject id: classID
firstPass ifTrue: [^ self].
stream nextPut: classID.
stream uint16: anObject digitLength.
1 to: anObject digitLength do: [:i | stream nextPut: (anObject digitAt: i)].
Offline
s_federici wrote:
TRocket wrote:
If you want to help Develop please tell me your Github username!
If you are still looking for developers/testers, let me know how I can help.
yep, we're still looking for any help people are willing to offer!
Please can you tell me your github username and i'll add you!
Offline
Can I do testing?
Offline
How do I get the program?
Offline
TRocket wrote:
Please can you tell me your github username and i'll add you!
It's sfederici. How do I know what I could help with first? Is there a way to "mark" something as in development?
Offline
s_federici wrote:
TRocket wrote:
Please can you tell me your github username and i'll add you!
It's sfederici. How do I know what I could help with first? Is there a way to "mark" something as in development?
i've added you. Just post on this thread and say you're working on it, we probably check it more than we check github
EDIT: if you want an "easy" thing so you can get used to the scratch 1.x reading code a bit maybe you could implement what was said further up this page...
Last edited by TRocket (2012-10-25 16:15:09)
Offline
It doesn't run; I need libexpat.dll to run. Where do I get that?
BTW my github username is ahirbhairav
Last edited by Paddle2See (2012-10-26 19:49:23)
Offline
ahirbhairav wrote:
It doesn't run; I need libexpat.dll to run. Where do I get that?
Hm...
It's somewhere on this post, looking for it.
EDIT: Found it it's here: http://ftp.gnome.org/pub/gnome/binaries … endencies/
Last edited by pwiter (2012-10-26 19:36:17)
Offline
Too many libs, which file?
Offline