- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 2
- Downvotes Received
- 3
- Posts with Downvotes
- 2
- Downvoting Members
- 3
87 Posted Topics
[QUOTE=Good Bye;595841]it'll take 6-12 months to make a simple bot in c++? wow.[/QUOTE] What, you think it's a slice of cake? :icon_rolleyes:
Yep. And experiment - if you have an idea you want to implement, start a new file and see if it works.
You can write sprite-based RPGs in Javascript, one guy even made a (slow) [url=http://www.nihilogic.dk/labs/chess/]3D chess game[/url] in JS. C++ is the preferred language for games, mainly for it's speed and efficiency.
[QUOTE=MidiMagic;450392]I mean your idea of automatically logging in to a website from a web page on click of a link is insecure. Google would not notice that as being an insecurity. It will find the page and list it. You can't have a "hidden" page on your website that only …
Keep in mind you can still use .NET on Linux/Mac/Windows with [url=http://www.mono-project.com/Main_Page]Mono[/url]. ;)
[icode]file:///C:/AdminFiles.xml[/icode]
When I first setup SDL I had to go through the includes and remove start_code.h / end_code.h from the includes. Bah.
Well, lose the CString. [code=c++] System::String value = "RegNo"; System::String key = "Dept"; System::String /* assuming */ getValue = ReturnValue(value, key);[/code]
I was thinking about making an avatar system (like Gaia Online; I've tried befor but it's hard). Can anybody help me with one? I'm gonna make an open source site like Gaia... I can't do it by myself, though.
From what I read, he's probably looking for something like [url]http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm[/url]
Like everyone else, I hate people that don't use code tags. Seriously, is it that hard?
[code=c++]class Foo { public: void SubFoo() { cout << "something"; } }; int main() { Foo foo; foo.SubFoo(); }[/code] edit: read the other part :x you could do something like [code=c++]class F { public: F() { cout << "something" << endl; } } class Foo : public F { }[/code] …
you want to read it? easy. *ahem* use an ifstream object on the file, read it into an event_info structure (like [icode]struct event_info { int something;string event;int x;int y; }[/icode]) and simulate the events (mouse_event for mup/mdown, SetCursorPos() for move) *walks away now*
system("start http://www.google.com"); or system("C:\\Program Files\\Mozilla Firefox\\firefox.exe");
>And Java is powerful and so is Assembly. The point is Assembler and C++ are the most efficient, when written right. >You can create languages from most any language. They are just mechanisms to convert text instructions to machine code. But sometimes languages throw in useless ASM/binary code that makes …
you [icode]delete[] m_Contents;[/icode] since it was allocated onto the heap not str.
Look at TinyXML or something, it's nicely done. now that makes me want to code an xml parser... perhaps with XPath support...
Use code tags and we might help. And you should really work on your code formatting. That looks terrible. ;)
Oh really now, did you have to necropost in a thread 3 years old?
>change into: wrong. It's not constant because it has expressions that change. Thus you need dynamic memory (allocated with [icode]new[/icode]) or a type that's managed automatically (like Narue said, [icode]std::vector[/icode] for example). Right, Narue? *still needs to learn [i]alot[/i]*
[url=http://msdn.microsoft.akadns.net/en-us/library/ms724895(VS.85).aspx]RegOpen()[/url], [url=http://msdn.microsoft.com/en-us/library/ms724923(VS.85).aspx]RegSetValueEx()[/url], [url=http://msdn.microsoft.com/en-us/library/ms724844(VS.85).aspx]RegCreateKeyEx()[/url], [url=http://msdn.microsoft.akadns.net/en-us/library/ms724837(VS.85).aspx]RegClose()[/url], etc. [url=http://msdn.microsoft.com/en-us/library/aa363634(VS.85).aspx]MS Example[/url]
On Windows you can just put the website on the command line and it will open in the default browser, i.e. [icode]system("http://www.google.com");[/icode]
Post the error... >#ifndef MAIN_H >#define MAIN_H you put your #endif in main, it should go at the bottom of your header.
I guess not - it still has garbage. Did this test. [code=c++]#include <cstdlib> #include <iostream> using namespace std; int main(int argc, char *argv[]) { int *nums = new int[10]; for(int i=0;i<10;++i) cout << i << ": " << nums[i] << endl; delete [] nums; system("PAUSE"); return EXIT_SUCCESS; } [/code] but …
And that's why you must use binary mode for FTP when transferring files from *nix to windows/mac/dos, otherwise the binary data will be corrupted by CRLFs. (and I will never understand that. :))
If you're talking about your program, post your code.
That would be ASCII, not ANSI ;) you can mark the thread solved now.
... you're not going to finish it unless someone does it for you. but nobody will.
Yeah, STL is the better way to go for C++. Also, use [icode]delete[] pointername; [/icode] instead of just delete.
Hey. What's better, i++ or ++i? Well ++i returns the value after it's incremented, but which is faster? (not necessarily for int, user-defined types with operator++ overloaded too.)
If you're using PHP, see [url="http://www.php.net/manual/en/function.shell-exec.php"]shell_exec()[/url].
Oh lord, people wanting us to help with CS bots... no, you do your own work. Actually learn something.
I know Pyton and I'm bored, so here (done in 5 minutes, so...): [code=c++] #include <cstdlib> #include <iostream> #include <ctime> using namespace std; int main(int argc, char *argv[]) { srand(time(NULL)); int arand[3]; for(int i=0;i<4;++i) arand[i] = rand()%30; cout << "Enter 4 numbers between 0 and 30." << endl; for(int i=0;i<4;++i) …
why the while loop? can't you just do something like [code=c++] for(int i=0;i<10;++i) { strArray[i] = ReceiveFromPipe(); } [/code] ?
well split() by default removes all whitespace/newlines, so pass it a specific delimiter, i.e. [code=python]string = "Hello,\nWorld" print string.split(",")[/code]
Yes, you can, but you can't use [icode]using namespace std;[/icode], i.e., [code=c++]#include <string> std::string str = "whatever"; class string { public: std::string str; }; string q;[/code] I think :P
well, you'd want to change your print function [code=c++]void print() { cout <<"hello, my major is " << major; cout << ", and my GPA is " << gpa << endl; }[/code] and, to set it, whenever you make your object you can do something like: [code=c++]Student x; x.major = …
Well it's better to learn a multi-platform GUI library than Win32 functions. For example, [URL="http://trolltech.com/products/qt/"]Qt[/URL], [URL="http://www.gtk.org/"]GTK+[/URL] and [URL="http://www.wxwidgets.org/"]wxWidgets[/URL] all work on Windows and Linux, and I'm sure Mac too. I hate Qt though, had a hard time with it. :P
If you use the new operator on a class, say [code=c++]class dummy { public: string f; }; int main(int argc, char *argv[]) { dummy *p = new dummy; return 0; }[/code] do you have to use the delete operator on [icode]p[/icode]? (since, apparently, it utilizes new.)
[QUOTE=jephthah;607919]um, trying to exploit Google page rankings is a significant problem even for experts.. as a "beginner", you'll be better served trying to program a Sudoku game or something... but, if you're really intent on trying to hack some websites, most SkriptKiddi3Z prefer Perl for this sort of task... .[/QUOTE] …
[QUOTE=Nemoticchigga;607825]#pragma once is the better way of doing it. ifdef, endif are outdated.[/QUOTE] not at all. :) [icode]#pragma once[/icode] is only supported by a few compilers. #ifndef, #define and #endif are supported by all compilers. :)
.... for sound use fmod or something, you can't do video in a *console* application.
... num1 is already of [b]int[/b] type, you WOULDN'T be able to enter a character anyway.
Wow, I noticed it got hacked too. And yet the admins don't post any threads.... shame shame shame... I think your passwords are safe.
I know the & operator means address-of, but what's it do when in a function prototype? Example: [code=c++]void foo(std::string& str)[/code] or [code=c++]void foo(char& c)[/code] what's the & for in that?
is grid an array chars? [code=c++]cout << (grid[r][c] == '1') ? '1' : '*' << ' ';[/code] or [code=c++]if(grid[r][c] == '0') cout << '*'; else cout << '1';[/code]
strrev is deprecated (OLD OLD [b]OLD[/b]) use [code=c++]int num = 5; // number char buffer[1000]; // this is where the integer is converted to itoa(num, buffer, 10);[/code]
The End.
hacker9801