User Profile

Collapse

Profile Sidebar

Collapse
mohaakilla51
mohaakilla51
Last Activity: Sep 18 '08, 10:13 PM
Joined: Jul 17 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • mohaakilla51
    replied to Searching arrays?
    in Java
    Lol, thanks :) I wrote that at like, midnight :P

    Question, do I have to write my own equals method, or does java do that automatically for me?
    See more | Go to post

    Leave a comment:


  • If it's javascript that causes the problem, try unchecking the "remove scripts" box at the bottom of the page :P
    See more | Go to post

    Leave a comment:


  • mohaakilla51
    started a topic Searching arrays?
    in Java

    Searching arrays?

    Is there a better way to do this:
    Code:
    // attackable[] is a array of Country objects. it is variable in length
    	public boolean canAttack(Country c) 
    	{
    		int x;
    		for(x = 0; (attackable[x] != c)&&(x < attackable.length); x++){};
    		if((x < attackable.length) && (attackable[x] == c)) 
    		{
    			if(c.getOwner() == owner)
    				return false;
    			else
    				return
    ...
    See more | Go to post

  • mohaakilla51
    started a topic Shortcut Help, C++, wxWidgets
    in C

    Shortcut Help, C++, wxWidgets

    OK, so I am making a program, with C++ and wxWidgets in which it reads stuff from a text file. My problem is, I made an installer, and it puts a shortcut on the desktop, but, whenever you run the shortcut, it tries to find the text files on the desktop and not the installation directory, where the shortcut links to. This is obviously because I didn't use absolute directories, but rather relative ones, so, is there anyway I can make it read the relative...
    See more | Go to post

  • mohaakilla51
    replied to Flashcard program outputting random data
    in C
    Is there really any need to do that? The Changes that I made to it in menu() were few, and really only so that It would look better on the output. That isn't what is causing my problem is it?
    See more | Go to post

    Leave a comment:


  • mohaakilla51
    started a topic Flashcard program outputting random data
    in C

    Flashcard program outputting random data

    Alright guys, I am working on a flashcard script... Previously I had it so that it onlty had predefined categories. People were complaining, so now I am trying to make it to where it reads flashcards.txt and then gets the categories from there.

    Anyhow, I understand how to do this, and there is nothing wrong with my syntax, because it compiles properly, but whenever it runs, it just starts outputting a bunch of random text, although...
    See more | Go to post

  • here is one error, on line 20, you say:
    Code:
        Grade(string nm, int ex1, int ex2, int hw, int final){setGrade(name, ex1, ex2, hw,final);}
    Where it should be
    Code:
        Grade(string name, int ex1, int ex2, int hw, int final){setGrade(name, ex1, ex2, hw,final);}
    //or
        Grade(string nm, int ex1, int ex2, int hw, int final){setGrade(nm, ex1, ex2, hw,final);}
    Because you get string nm,...
    See more | Go to post
    Last edited by mohaakilla51; Nov 5 '07, 03:40 AM. Reason: looked for other errors... didn't find any

    Leave a comment:


  • mohaakilla51
    replied to File output problem
    in C
    have you tried using an ofstream instead of just an fstream? Just a thought.
    See more | Go to post

    Leave a comment:


  • mohaakilla51
    started a topic Good Windows Tutorial/Book?
    in C

    Good Windows Tutorial/Book?

    Alright, so I believe that I have a decently good grasp on Basic C++, but I cannot get into the Windows Programming, it makes no sense, is there anyone that can recommend a good C++ Windows API tutorial I would be extremely grateful. I googled "Windows API Tutorial, C++" but all I got weren't very good tutorials, and were hard to understand.
    See more | Go to post

  • mohaakilla51
    replied to Format output from mysql table
    in PHP
    just tell it to display in a <div> with a specified width... (and make sure to have a doctype :P)
    See more | Go to post

    Leave a comment:


  • mohaakilla51
    replied to what editor is good for php?
    in PHP
    In all reality, I still use Notepad for my PHP :O And I have been doing PHP for a little over 4 years...
    See more | Go to post

    Leave a comment:


  • mohaakilla51
    replied to efficiency problem?
    in C
    that will not work because, say I have a string that is 200 chars long. 200/73 = approx(2.73) + 1 thus qsize is 3 (once typecasted). However, say the string has a space at char 50, and then not again until 74. OK, so that gives you a first line of length 50. Then you go, and the last space in the next line is at char 120. thus, you get a line of 50, and a line of 70. 50 + 70 = 120. It would only loop through 1 more time, and would not get the rest...
    See more | Go to post

    Leave a comment:


  • mohaakilla51
    replied to efficiency problem?
    in C
    OK, so I was able to fix it, or so I thought, the problem is now that it goes back into the infinite loop if a word wraps around on to two lines normally, such as a word that goes from char 70, to char 80. Here is theh code, any help would be greatly appreciated.
    [code=cpp]
    vector<string> q;
    int qsize = ((question.leng th()/73) + 1);
    switch (qsize)
    {
    case 1:
    ...
    See more | Go to post

    Leave a comment:


  • mohaakilla51
    replied to efficiency problem?
    in C
    THANK YOU SO MUCH!!! I went through My logic soooooo many times but I never found the problem!!
    See more | Go to post

    Leave a comment:


  • mohaakilla51
    replied to Dealing with libraries in program
    in C
    sounds like a horrible topic title. BTW, if you want help, show the experts that you did some work...
    See more | Go to post

    Leave a comment:


  • mohaakilla51
    started a topic efficiency problem?
    in C

    efficiency problem?

    OK, so I am writing a flashcard script for the command prompt (hence, all of my other questions). I had the script working fine, except for the fact that when I displayed a question (or answer) that was more than 1 line long, then it would break in the middle of the word. So I tried to fix this by dividing the question/answer into lines of 73 chars (or less), and then display it line by line.

    here is what I came up with:
    [code=cpp]...
    See more | Go to post
    Last edited by mohaakilla51; Oct 29 '07, 03:12 AM. Reason: forgot the rest of post :O

  • mohaakilla51
    replied to setting command prompt width and height?
    in C
    actually, I think the default size is just fine after all :)
    See more | Go to post

    Leave a comment:


  • mohaakilla51
    started a topic setting command prompt width and height?
    in C

    setting command prompt width and height?

    OK guys, so How do you set the width and the height of the Command Prompt from within C++? Is it possible? I thought that maybe system.width or something like that, but it didn't work. So then I googled and All I found was how to do it manually (By going into properties...).

    So does anyone know how to do that?
    See more | Go to post

  • mohaakilla51
    replied to returning to the top of a file
    in C
    That I Can Do. Thanks for all the help guys
    See more | Go to post

    Leave a comment:


  • mohaakilla51
    replied to returning to the top of a file
    in C
    OK guys, I figured out that problem, it did actually go back to the start of the file, I just hadn't cleared the eof property, so when I tested, it told me it was at the end of file already.

    On a side note: How do you set the width and height of the command prompt from within C++?
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...