Search Results

Showing results 1 to 40 of 129
Search took 0.01 seconds.
Search: Posts Made By: hacker9801
Forum: C++ Jul 13th, 2008
Replies: 22
Views: 1,869
Posted By hacker9801
What do you expect it to do? Assign "foo" to the class that's in Foo, or call it's constructor (like I did in the second code example)?
Forum: C++ Jul 13th, 2008
Replies: 22
Views: 1,869
Posted By hacker9801
class Foo {
public:
void SubFoo() { cout << "something"; }
};

int main() {
Foo foo;
foo.SubFoo();
}
Forum: C++ Jul 12th, 2008
Replies: 8
Views: 763
Posted By hacker9801
system("start http://www.google.com");
or system("C:\\Program Files\\Mozilla Firefox\\firefox.exe");
Forum: C++ Jul 11th, 2008
Replies: 11
Views: 929
Posted By hacker9801
oh, right... sorry about that I don't see the bigger picture in anything :P
Forum: C++ Jul 11th, 2008
Replies: 4
Views: 506
Posted By hacker9801
Look at TinyXML or something, it's nicely done.

now that makes me want to code an xml parser... perhaps with XPath support...
Forum: C++ Jul 11th, 2008
Replies: 11
Views: 929
Posted By hacker9801
you delete[] m_Contents; since it was allocated onto the heap not str.
Forum: C++ Jul 11th, 2008
Replies: 4
Views: 905
Posted By hacker9801
you want to read it? easy.
*ahem*

use an ifstream object on the file, read it into an event_info structure (like struct event_info { int something;string event;int x;int y; })

and simulate the...
Forum: Game Development Jul 10th, 2008
Replies: 14
Views: 5,162
Posted By hacker9801
You can write sprite-based RPGs in Javascript, one guy even made a (slow) 3D chess game (http://www.nihilogic.dk/labs/chess/) in JS.

C++ is the preferred language for games, mainly for it's speed...
Forum: C++ Jul 10th, 2008
Replies: 13
Views: 19,831
Posted By hacker9801
Oh really now, did you have to necropost in a thread 3 years old?
Forum: C++ Jul 10th, 2008
Replies: 4
Views: 793
Posted By hacker9801
Read the bottom link. It has example code, read it yourself.
Forum: C++ Jul 10th, 2008
Replies: 4
Views: 793
Posted By hacker9801
RegOpen() (http://msdn.microsoft.akadns.net/en-us/library/ms724895(VS.85).aspx), RegSetValueEx() (http://msdn.microsoft.com/en-us/library/ms724923(VS.85).aspx), RegCreateKeyEx()...
Forum: C++ Jul 9th, 2008
Replies: 38
Views: 4,374
Posted By hacker9801
Yeah, and you have more control over objects in C++. Pointers, references, whatever. They all allow you greater control over what you code.
Forum: C++ Jul 9th, 2008
Replies: 6
Views: 746
Posted By hacker9801
On Windows you can just put the website on the command line and it will open in the default browser, i.e. system("http://www.google.com");
Forum: C++ Jul 9th, 2008
Replies: 38
Views: 4,374
Posted By hacker9801
Mhm. That's the whole point, choose the language for the job. Java is better than C++ at string parsing, C++ is better than Java at low-level things, bit manipulating, memory stuff, games......
Forum: C++ Jul 9th, 2008
Replies: 38
Views: 4,374
Posted By hacker9801
>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...
Forum: C++ Jul 9th, 2008
Replies: 7
Views: 2,864
Posted By hacker9801
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. :))
Forum: C++ Jul 9th, 2008
Replies: 27
Views: 147,200
Posted By hacker9801
You're the n00b here ;)
MSVS is alright, but there is no best compiler.
Forum: C++ Jul 9th, 2008
Replies: 27
Views: 147,200
Posted By hacker9801
Keep in mind you can still use .NET on Linux/Mac/Windows with Mono (http://www.mono-project.com/Main_Page). ;)
Forum: C++ Jul 9th, 2008
Replies: 15
Views: 1,355
Posted By hacker9801
try something like:

System::String^ ofnen = gcnew System::String("OPen");

System::String^ often = gcnew System::String("de|en");

System::String t = ...
Forum: C++ Jul 9th, 2008
Replies: 16
Views: 1,237
Posted By hacker9801
like they said, you can't initialize variables inside the class declaration.

furthermore, you should use arrays instead of question<number>, like string question[4];.
Forum: C++ Jul 9th, 2008
Replies: 5
Views: 1,411
Posted By hacker9801
If you're talking about your program, post your code.
Forum: C++ Jul 9th, 2008
Replies: 6
Views: 1,292
Posted By hacker9801
>change into:
wrong. It's not constant because it has expressions that change. Thus you need dynamic memory (allocated with new) or a type that's managed automatically (like Narue said, std::vector...
Forum: C++ Jul 9th, 2008
Replies: 7
Solved: Convert to ANSI
Views: 1,317
Posted By hacker9801
haha, you use standard C code for the first part then a C++-style cast for the function. You should just make it C,
int Crypt(char *szChar)
{
return (int)szChar[0];
}
Forum: Geeks' Lounge Jul 8th, 2008
Replies: 17
Views: 1,326
Posted By hacker9801
Forum: C++ Jul 8th, 2008
Replies: 16
Views: 1,237
Posted By hacker9801
Post the error...

>#ifndef MAIN_H
>#define MAIN_H
you put your #endif in main, it should go at the bottom of your header.
Forum: C++ Jul 8th, 2008
Replies: 7
Solved: Convert to ANSI
Views: 1,317
Posted By hacker9801
That would be ASCII, not ANSI ;)

you can mark the thread solved now.
Forum: C++ Jul 8th, 2008
Replies: 15
Views: 1,355
Posted By hacker9801
C# doesn't have STL. .NET has System::String and all that.

What's the ^ for anyway?
Forum: C++ Jul 8th, 2008
Replies: 7
Views: 617
Posted By hacker9801
Use code tags and we might help.

And you should really work on your code formatting. That looks terrible. ;)
Forum: C++ Jul 8th, 2008
Replies: 15
Views: 1,355
Posted By hacker9801
Read my post in your other thread.
Forum: C++ Jul 8th, 2008
Replies: 31
Views: 2,131
Posted By hacker9801
...
USE. CODE. TAGS.

CHANGE IT TO int canidate[5];
Forum: C++ Jul 8th, 2008
Replies: 15
Views: 1,355
Posted By hacker9801
Well, lose the CString.


System::String value = "RegNo";
System::String key = "Dept";

System::String /* assuming */ getValue = ReturnValue(value, key);
Forum: C++ Jul 8th, 2008
Replies: 31
Views: 2,131
Posted By hacker9801
He obviously doesn't want to learn and can't google. :P
Forum: C++ Jul 8th, 2008
Replies: 3
Views: 388
Posted By hacker9801
Yeah, STL is the better way to go for C++.

Also, use delete[] pointername; instead of just delete.
Forum: C++ Jul 8th, 2008
Replies: 31
Views: 2,131
Posted By hacker9801
And there's three problems with your if-statements:

1: == is the comparison operator, not =
2: "cnd1" is not a char, it's a string. canidates[] is a char array.
3: if canidates[] was a char...
Forum: C++ Jul 7th, 2008
Replies: 2
Solved: i++ vs. ++i?
Views: 2,278
Posted By hacker9801
Thanks, Duoas.
Forum: C++ Jul 7th, 2008
Replies: 2
Solved: i++ vs. ++i?
Views: 2,278
Posted By hacker9801
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.)
Forum: C++ Jul 7th, 2008
Replies: 7
Views: 927
Posted By hacker9801
I guess not - it still has garbage.

Did this test.

#include <cstdlib>
#include <iostream>
using namespace std;

int main(int argc, char *argv[])
{
Forum: C++ Jul 7th, 2008
Replies: 31
Views: 2,131
Posted By hacker9801
...
you're not going to finish it unless someone does it for you. but nobody will.
Forum: C++ Jul 5th, 2008
Replies: 6
Views: 1,521
Posted By hacker9801
Oh lord, people wanting us to help with CS bots... no, you do your own work. Actually learn something.
Forum: C++ Jul 5th, 2008
Replies: 2
Views: 1,176
Posted By hacker9801
If you're using PHP, see shell_exec() (http://www.php.net/manual/en/function.shell-exec.php).
Showing results 1 to 40 of 129

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC