Some c++ Questions
Some c++ Questions
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.
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
Huh? I mean... huh?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.
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.
That's not a C++ question. And it depends on what framework you are using. GTK? Qt? wxwindows? MSFC? .NET?How do you make the application start up in full screen, instead of setting default height/width?
See above.How do you go about placing a pixel/image on the screen?
Every good solution is obvious once you've found it.
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
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.
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 (Quite a few actually.. but still..)
Re: Some c++ Questions
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 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.
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.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?
Toodles!
C8H10N4O2 | #446691 | Trust the nodes.
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.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...
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
What do you expect? You're not making any sense: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.
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 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.
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 make the application start up in full screen, instead of setting default height/width?
Again.. Your questions are extremely vague!blah569 wrote:How do you go about placing a pixel/image on the screen?
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
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
Author of COBOS
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...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.
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.
C8H10N4O2 | #446691 | Trust the nodes.
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.
Why is C always assumed to be for system programming? C can do web scripting too!maddog39 wrote:Ummm.... why is it always a common assumtion that PHP is just for websites...
C8H10N4O2 | #446691 | Trust the nodes.
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.
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.
Every good solution is obvious once you've found it.