• What Are You Working On? V13
    5,003 replies, posted
[QUOTE=efeX;25754665]wheres yo classes[/QUOTE] Oh shizzy, when I compile it in Code::Blocks, it has a pause at the end where it says "Press any key to continue..." but when I run it from desktop, it instant shuts. Even worse, when I type in system("pause"), it gives up an error "error: 'system' was not declared in this scope". Can somebody help? EDIT: Problem solved, I had to include <cstdlib>. Why don't other tutorials add this in?
char junk; cin >> junk;
[QUOTE=efeX;25754665]wheres yo classes[/QUOTE] Classes are used to represent objects or data types needed in the problem domain. There is nothing in the problem of addition that needs anything other than integers.
[QUOTE=deloc;25753483]no it isn't. seriously it's literally a rock texture, some layer-styled text using the trash you find on dafont, and a vignette.[/QUOTE] I'm glad you're able to break it down to its core components. It doesn't matter at all what it's made out of, just how the final product looks.
[QUOTE=andersonmat;25753527]I actually made it myself. I can send you my Eclipse preference file if you'd like.[/QUOTE] Do it ! Meanwhile, I kind of succeeded making particles work: [IMG]http://imgur.com/kn0QS.jpg[/IMG]
[QUOTE=andersonmat;25755048]I'm glad you're able to break it down to its core components. It doesn't matter at all what it's made out of, just how the final product looks.[/QUOTE] it looks like shit. [highlight](User was banned for this post ("This isn't constructive criticism." - birkett))[/highlight]
[QUOTE=deloc;25755157]it looks like shit.[/QUOTE] That's your opinion, and you're entitled to your own. I'm not going to argue with your opinion, he liked it, it suited him.
I thought this was the programming section.
[QUOTE=Xerios3;25755099]Do it ![/QUOTE] [url=http://anyhub.net/file/org.eclipse.jdt.ui.prefs]Here you go.[/url] That contains all of the colors for the theme. That may only work for Java but regardless they're all there if you want to edit the syntax highlighting for C++, etc. That file will go in: [workspace]\.metadata\.plugins\org.eclipse.core.runtime\.settings
[QUOTE=deloc;25755157]it looks like shit.[/QUOTE] That there is some nice constructive criticism. Funny how no-one else seems to agree with you. I also found it funny how you rated yourself agree.
[QUOTE=Cookieeater;25754329]I made my first C++ calculator! Is this good or messy code? [code]#include <iostream> int main() { using namespace std; int a; int b; int sum; cout << "give me yo numbas to add"; cout << endl; cin >> a; cout << a << " plus what skillet biscut?"; cout << endl; cin >> b; sum = a+b; cout << a << "+" << b << "=" << sum; cout << endl; cout << "that is yo numba, use your brain next time lardhat"; return 0; } [/code][/QUOTE] I think it's easier to go like this: [code]#include <iostream> int main() { using namespace std; int a; int b; cout << "give me yo numbas to add" << endl; cin >> a; cout << a << " plus what skillet biscut?" << endl; cin >> b; cout << a << "+" << b << "=" << a + b << endl << "that is yo numba, use your brain next time lardhat"; return 0; }[/code]
[QUOTE=Xion12;25757000]I think it's easier to go like this: [code]some code[/code][/QUOTE] I just like the fact that it's the first thing to call me a skillet biscut.
[QUOTE=deloc;25755157]it looks like shit.[/QUOTE] Someone's a little jelly.... [editline]31st October 2010[/editline] Does anyone have any ideas of what I should do here that doesn't involve else ifs? [csharp] var cmd = Command.Deserialize(payload); if (cmd is GetCommand) { // do stuff with ((GetCommand)cmd) } else if (cmd is StoreCommand) { // do stuff with ((StoreCommand)cmd) } [/csharp]
[QUOTE=Xion12;25757000]I think it's easier to go like this: [code]#include <iostream> int main() { using namespace std; int a; int b; cout << "give me yo numbas to add" << endl; cin >> a; cout << a << " plus what skillet biscut?" << endl; cin >> b; cout << a << "+" << b << "=" << a + b << endl << "that is yo numba, use your brain next time lardhat"; return 0; }[/code][/QUOTE] Ah! I forgot that you could put as much code as you want on 1 line.
[QUOTE=Siemens;25757232]Someone's a little jelly....[/QUOTE] yes i'm totally jealous that i don't make effortless garbage. IMPENDING AD HOMINEMS
You can also do it like this if I'm not mistaken. [code]cout << a << "+" << b << a+b << endl << "that is your answer."; [/code]
[QUOTE=BlkDucky;25756495]I also found it funny how you rated yourself agree.[/QUOTE] a creator shouldn't disagree with someone's criticism of their work so i think it kinda balances out.
Wow, well I'm sort of pissed. :/ Today when I first woke up, I wanted to change some things with the server's function and it's way of saving to the score list. Things like checking for name sizes, semi colons, blank fields, ect. Just in case the client does some changing around or whatever. Anyway, I haven't programmed all day, but about 10 minutes ago my friend played my game, he gave some comments and everything. Naturally I check the score list, see what he got. There was nothing added. I check my .php file and I see a loop doing this: [code] for($i = 0; $ i < 15; $i++) [/code] There was a space between the $ and the i. Also I don't think there's a ++ operator in php. >.> But thanks to everyone that did happen to play the game after this fucked update was released. But it's up and working now. I just hope I don't run into another one. :S
Did a pretty big overhaul on my To Do List Application, made it a lot simpler and much more intuitive to use. It's not all flashy anymore, or huge, but it looks decent and is a lot more usable. [img]http://imagebin.ca/img/IF1lloZ.png[/img]
Writing a BBS. I'm designing it as a super modular system, with the main part of it working with IUser, IUserProvider, etc. objects. That way it should be super easy to replace out the backend model. [img]http://ahb.me/OiR[/img] I've also fired up a Ubuntu Server VM and setup a user with this program as it's shell (so I can make the user login information public, and people connecting in will be dropped straight into this BBS) [img]http://ahb.me/OiT[/img]
I hit F7 to refresh the page... :sigh:
Alrighty, I'm going to make a game.
[QUOTE=Siemens;25757232]Someone's a little jelly.... [editline]31st October 2010[/editline] Does anyone have any ideas of what I should do here that doesn't involve else ifs? [csharp] var cmd = Command.Deserialize(payload); if (cmd is GetCommand) { // do stuff with ((GetCommand)cmd) } else if (cmd is StoreCommand) { // do stuff with ((StoreCommand)cmd) } [/csharp][/QUOTE] You could use a swtich: [cpp]switch(cmd.GetType()) { case typeof(GetCommand): //do stuff with ((GetCommand)cmd) break; case typeof(StoreCommand): //do stuff with ((StoreCommand)cmd) break; }[/cpp] [editline]31st October 2010[/editline] Actually, the type is of type System.Type, thus I think not switchable. You could try switching cmd.getType().GUID.ToString().
Nah, you should totally use Else If Else If Else If Else If [url=http://www.facepunch.com/showpost.php?p=24405529&postcount=3479]All the best coders do that.[/url]
Don't mock Null. He's in a commercial world now and has no time for fancy things like applying switch, which evidentially is much more complicated than using a plain and simple if..else if chain. You're just mad because there's no native plugin support. Again, Null has to weight the usability against the time needed to implement it. A whole plugin-system would have taken so long and for what? Just so you can play pong in a grapher? Or extend functionality without Nulls approval? Whatever arguments you bring will be invalid, because you are thinking in a hobbyist way.
I've been experimenting with immediate mode approach to GUIs over the weekend. [img_thumb]http://i56.tinypic.com/161mpg.png[/img_thumb] The entire code for creating the layout is: [cpp] GUI.UIInterface.Start(state, mousePos.X, mousePos.Y, r); if (GUI.Widgets.Button.Do(1, f + 0.05f, 0.05f, "Press Me :)")) { //Button Pressed f += 0.1f; } //FORM 1 currentForm.Start("Form 1"); if (GUI.Widgets.Button.Do(2, 0.05f, 0.15f, "D")) { //Button Pressed } currentForm.End(); //FORM 2 Form2.Start("Form 2"); if (GUI.Widgets.Button.Do(3, f + 0.05f, 0.05f, "Text Yo")) { //Button Pressed f += 0.1f; } if (GUI.Widgets.Button.Do(4, state.mousex, state.mousey, "")) { //Button Pressed } Form2.End(); //FORM 3 Form3.Start("TITLE"); Form3.End(); GUI.UIInterface.End(); [/cpp] Which is quite a different approach from traditional GUIs. The advantage is all the code is contained in one area, as opposed to being separated throughout all different modules. The code is also parallel to the way OpenGL or DirectX code is written, so it fits in with those much easier. I haven't done any benchmarking compared to the traditional approach but my intuition tells me this way would be slightly faster, on top of using hardly any memory. My biggest concerns at the moment is the lack of detectable events other than button presses and the garbage made from chucking strings around left, right and center. What do you guys think? Can you see any way to simplify that block of code?
What's a good MySQL GUI? I've tried SQLyog and HeidiSQL and they are both too busy. Normally I only want to do table design and simple querying - all the rest I can do from whatever app I'm working on.
I've tried many different MySQL clients, and believe me, Heidi is hands-down the best. The UI is clean, and if all you're after is table designing and querying, it won't get in your way.
[QUOTE=CarlBooth;25762048]What's a good MySQL GUI? I've tried SQLyog and HeidiSQL and they are both too busy. Normally I only want to do table design and simple querying - all the rest I can do from whatever app I'm working on.[/QUOTE] I found Navicat to be my personal favorite.
[QUOTE=ZeekyHBomb;25761489]You're just mad because there's no native plugin support. Again, Null has to weight the usability against the time needed to implement it. A whole plugin-system would have taken so long and for what? Just so you can play pong in a grapher? Or extend functionality without Nulls approval?[/QUOTE] And who would want plugins anyway? This is the business world. There's absolutely no possible purpose for plugins, because Null's already implemented the good functionality and anything else would just be impressing people with primitive functionality. And when everyone else is writing plugins, Null will be climbing to the top. You'll remember the name.
Sorry, you need to Log In to post a reply to this thread.