Page 1 of 1

Some c++ Questions

Posted: Wed Feb 07, 2007 10:10 pm
by blah569
I have some c++ questions, and here they are:

How would I go about jumping to a certain part of a script? Like, for a file menu? I have some examples, but I really don't understand it... If I can find a connection to php, I can learn this better.

How do you make the application start up in full screen, instead of setting default height/width?

How do you go about placing a pixel/image on the screen?

I might have some more questions later, but this is all I can think I need at the moment. Please Help. Thanks.

Re: Some c++ Questions

Posted: Thu Feb 08, 2007 1:49 am
by Solar
blah569 wrote:How would I go about jumping to a certain part of a script? Like, for a file menu? I have some examples, but I really don't understand it... If I can find a connection to php, I can learn this better.
Huh? I mean... huh?

C++ and PHP are for very, very different things. So different, in fact, that I have never bothered how to call "a certain part of a (PHP?) script" from within C++ code. In situations like these, I suspect you're either misusing PHP or C++ for what you have in mind.
How do you make the application start up in full screen, instead of setting default height/width?
That's not a C++ question. And it depends on what framework you are using. GTK? Qt? wxwindows? MSFC? .NET?
How do you go about placing a pixel/image on the screen?
See above.

Posted: Thu Feb 08, 2007 4:25 pm
by blah569
You're wrong on the fact of php and c++ different (barely similar, only with small aspects)... c++ and php's if statements are similar.

Yes, php is for web and c++ is for programs though.

Anyway, I use Dev c++ if that helps lol.

Posted: Thu Feb 08, 2007 4:28 pm
by Brynet-Inc
blah569 wrote:You're wrong on the fact of php and c++ different (barely similar, only with small aspects)... c++ and php's if statements are similar.

Yes, php is for web and c++ is for programs though.

Anyway, I use Dev c++ if that helps lol.


:lol: Wow thats funny.. C/C++ are much lower level programming languages, They are also compiled languages.

PHP is a web scripting language, While it might share a similar syntax. They are different, Thus you're wrong.. Not Solar.

DevC++ is just a MinGW/GCC IDE for Win32, While that might be a good compiler choice, He is right.. Without information about what GUI toolkit you're using.. Quotes like: (How do you make the application start up in full screen, instead of setting default height/width?) are rather uninformative.

Not everyone here uses Win32 :wink: (Quite a few actually.. but still..)

Re: Some c++ Questions

Posted: Thu Feb 08, 2007 4:36 pm
by Alboin
blah569 wrote:How would I go about jumping to a certain part of a script? Like, for a file menu? I have some examples, but I really don't understand it... If I can find a connection to php, I can learn this better.
Jumping like a goto statement? In C\C++ this is generally done with functions, classes, etc. Jumping using goto's are generally discouraged.
blah569 wrote:How do you make the application start up in full screen, instead of setting default height/width?

How do you go about placing a pixel/image on the screen?
In C\C++ there is no super all in one library like in Python, or PHP. Instead, it uses a system of libraries which consist of precompiled functions and classes. For grpahical stuff, I suggest SDL.

Toodles!

Posted: Thu Feb 08, 2007 4:57 pm
by blah569
I know all about php, I have mastered that language, and it is my favorite language I have seen yet. I know that c++ gets complied, etc, and that php runs through web servers, yes.

Posted: Fri Feb 09, 2007 2:08 am
by Solar
Nice that you "have mastered" PHP. But you still don't give the information that would be required to answer your question...

Between your chosen nickname and how this thread is going along, you're losing credit, fast...

Posted: Fri Feb 09, 2007 4:19 pm
by blah569
Solar wrote:Nice that you "have mastered" PHP. But you still don't give the information that would be required to answer your question...

Between your chosen nickname and how this thread is going along, you're losing credit, fast...
Yeah, Arg I really hate going to new forums, well not so bad, but what I mean is that I have 1000+ posts on a different forum, and then you have to prove somewhere else that you know what you're talking about.

Posted: Fri Feb 09, 2007 4:32 pm
by Brynet-Inc
blah569 wrote:Yeah, Arg I really hate going to new forums, well not so bad, but what I mean is that I have 1000+ posts on a different forum, and then you have to prove somewhere else that you know what you're talking about.
What do you expect? You're not making any sense:
blah569 wrote:How would I go about jumping to a certain part of a script? Like, for a file menu? I have some examples, but I really don't understand it... If I can find a connection to php, I can learn this better.
This is complete nonsense, It doesn't have any basis in C or C++, You refer your C++ source as if it's a script.. Jumping? Have you ever heard about functions? A connection to PHP? what on earth were you talking about?
blah569 wrote:How do you make the application start up in full screen, instead of setting default height/width?
You don't even mention what GUI toolkit you're talking about, nor do you mention the operating system you use.
blah569 wrote:How do you go about placing a pixel/image on the screen?
Again.. Your questions are extremely vague! :roll:

Posted: Fri Feb 09, 2007 4:38 pm
by os64dev
i get that it can be frustrating, but like solar said about the fact that you are losing credit is mainly due to the fact that you combine c++ and scripts in one sentence. It proves that you don't have any experience with c++ because that doesn't work with scripts.

php gives you an extensive library with a lot of functionality which you can use. with os development it means that you have to build this library youself. php can be seen as a high-level language wereas c++ is a lowlevel language. php is problably implemented with c/c++.

my guess is that you first have to study the language c before jumping to c++ because you don't want to be troubled with multiple/single inheretence constructors, destructors, function/operator overloading just yet. Google for "c hello world" will problably give you the first example everybody goes through.

regards

Posted: Fri Feb 09, 2007 4:41 pm
by Alboin
blah569 wrote:Yeah, Arg I really hate going to new forums, well not so bad, but what I mean is that I have 1000+ posts on a different forum, and then you have to prove somewhere else that you know what you're talking about.
Aye, I could have 10,000 posts on a forum about BASIC, and post nothing but jarble. So, your post count is quite irrelevant. Unless, of course your posts are intelligent...

Anyway, back on topic; windows, graphics, etc. are not C++. They really have nothing to do with C++, as I could just as easily use them in C, Perl, Lisp, or Assembly. So the question is, do you understand the basics about C++? (OOP, STL, etc.) From you previous quotes it appears that you don't. (Although I often assume things wrongly...) Learn C++, and the libraries will usually be just as easy to use as the language. An extension of it really. Get a book on it. I find books nicer than reading something online. Learn...Read...Reading is your friend......

However, if you know C++....Your operating system is somewhat irrelevant, as using anything that's not already system independent is a mistake to begin with. So, go with wxWidgets or Qt. Both are quite good. Or, for something more involved with graphics go with SDL, which is quite awesome.

Toodles.

Posted: Mon Feb 19, 2007 7:03 pm
by maddog39
Ummm.... why is it always a common assumtion that PHP is just for websites... I am a PHP developer of 3 years.. and ummm anything you can do in Python or Tcl or Ruby, you can do in PHP. Except for Qt, they do have a GTK+ wrapping for PHP ( http://gtk.php.net/ ) and there is a guide in the PHP manual for command line scripts as well.

Posted: Mon Feb 19, 2007 10:12 pm
by Alboin
maddog39 wrote:Ummm.... why is it always a common assumtion that PHP is just for websites...
Why is C always assumed to be for system programming? C can do web scripting too!

Posted: Tue Feb 20, 2007 12:13 am
by Solar
Let's not get into another round of "you can do that with X, too".

The point is, some combinations are so strange that you are probably abusing one of the languages involved. While it can be fun to "force-feed" a compiler / interpreter that way, it is seldom-to-never a good way to approach a solution. In such a situation, I prefer to point out a better way to the solution, instead of spending time hacking around. Call me results-fixated.