User Profile

Collapse

Profile Sidebar

Collapse
Dameon99
Dameon99
Last Activity: Nov 3 '07, 01:24 AM
Joined: Jun 19 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • All variables should be initialised when you decalare them.

    ie int i = 0;

    i will be changed later in your code but this would initialise the variable and keep your compiler happy :-)...
    See more | Go to post

    Leave a comment:


  • desperate help needed! java.util.Scanner weird error.

    Hi.. Im experiencing a weird error I dont know how to fix. I have a scanner object and whenever I use nextInt, anything above 3 causes the program to crash saying and links me to this line of the class: (one I added all the asteriss to.



    // If we are at the end of input then NoSuchElement;
    // If there is still input left then InputMismatch
    private void throwFor() {
    skipped = false;
    ...
    See more | Go to post
    Last edited by r035198x; Nov 2 '07, 07:12 AM. Reason: Removed code tags believe it or not

  • Dameon99
    replied to form mandatory fields
    Why is this? JUst wondering if you could explain it s I understand what I am doing wrong....
    See more | Go to post

    Leave a comment:


  • Dameon99
    replied to form mandatory fields
    "brochure1" is name of the html file brochure1.html....
    See more | Go to post

    Leave a comment:


  • Dameon99
    replied to form mandatory fields
    btw this code worked for another site.. but for some reason not this one. Can anyone tell me what Im doing wrong?!
    See more | Go to post

    Leave a comment:


  • Dameon99
    started a topic form mandatory fields

    form mandatory fields

    Ive been looking through a whole tonne of sites to try to find out how I can make my fields mandatory but havnt been able to find something so far which actually tells me whwta I want to know. Ive tried a couple of code segments but they havnt been working. can anyone tell me how I can make fields in my code mandatory?

    My attempt at solving this is below:

    Code:
    <html>
    <head>
    
    <title>Coals
    ...
    See more | Go to post

  • Dameon99
    replied to passing data in C without returning.
    in C
    Thanks Goelvivek. that was everything I needed! :-D
    See more | Go to post

    Leave a comment:


  • Dameon99
    replied to passing data in C without returning.
    in C
    lol, dw, I am well versed that I cant make multiple returns. could you tell me how to use this pointer and give me an example?...
    See more | Go to post

    Leave a comment:


  • Dameon99
    started a topic passing data in C without returning.
    in C

    passing data in C without returning.

    Hi all,
    I am passing data into a function in C to be edited but that function already returns some data. I was wondering how i could pass data in to a function so that when it is edited it is chnaged universally?? Ive tried using pass by reference:
    int myFunction(&dat a)
    butthe compiler chucks a wobbly with it. I thought maybe pointers but I need to be explained how to do it.
    See more | Go to post

  • Dameon99
    started a topic "Access Violation with segmentation errors"!
    in C

    "Access Violation with segmentation errors"!

    Hi,
    I have just spent many hours debugging my code and now when I run it I get the following error:

    "An access violation (Segmentation fault) raised in your program"

    I have researched on this and found that it is usually the result of faulty pointers or memory that is not allocated. However I have allocated all of my memory corectly (I feel) and my pointers look to be correct.. Is there another reason...
    See more | Go to post

  • Dameon99
    replied to C runtime errors. desperately needing help.
    in C
    dw, i have managed to fix all of these errors. Thankyou to all of you who assisted me with this.
    See more | Go to post

    Leave a comment:


  • Dameon99
    replied to C runtime errors. desperately needing help.
    in C
    Im getting these errors now on compile. It compiles with no problems in C++ but needs to be in C.. I honestly cant see anything wrong in any of these and is everything I have been taught in C.

    43 syntax error before '&' token
    45 syntax error before '&' token
    46 syntax error before '&' token
    96 syntax error before '&' token
    In function `readMatrix':
    99 `fp' undeclared (first...
    See more | Go to post

    Leave a comment:


  • Dameon99
    replied to C runtime errors. desperately needing help.
    in C
    the program doesnt even prompt the user for the file name though.. Ill give it a try and c what I can do. Thanks heaps.
    See more | Go to post

    Leave a comment:


  • Dameon99
    replied to C runtime errors. desperately needing help.
    in C
    btw i think my compiler is compiling my code as C++. That may help some?
    See more | Go to post

    Leave a comment:


  • Dameon99
    replied to C runtime errors. desperately needing help.
    in C
    I am running a debugger but it int stopping at anything just coming up with an error.. I suppose I ould put printf s everywhere and try it that way but it is very time consuming.
    Can you tell me more about why NULL would cause a segmentation violation? we were told to use it....
    See more | Go to post

    Leave a comment:


  • Dameon99
    replied to C runtime errors. desperately needing help.
    in C
    it also points to this in <stdio.h>:

    "{ return __F->_flag & _IOEOF; }"

    I dont understand what this means, im hoping one of you does..
    See more | Go to post

    Leave a comment:


  • Dameon99
    started a topic C runtime errors. desperately needing help.
    in C

    C runtime errors. desperately needing help.

    my program compiles without problems but when i try to run it pauses shortly and then crashes. When i set it to debug it came up with the following message:

    "An Access Violation (Segmentation Fault) raised in your program."

    Ill put my code below. can anyone see why it is doing this?

    [code=c]
    /* Program Function: Reads in data on a boolean matrix (/s) and outputs
    * whether...
    See more | Go to post

  • Dameon99
    replied to caloc errors in compile
    in C
    Problem Fixed!!!!!

    For some reason I had to typecast calloc to an int. I think it may have been compiling as a C++ file :-S. I just read in a guide on the net that you should always typecast it even in C.

    Solution was (for those who are curious):

    Code:
    	*matrixPointer = (int *)calloc(rows, sizeof(int *));
    and

    Code:
    	*matrixPointer[index1] = (int)calloc(columns,
    ...
    See more | Go to post

    Leave a comment:


  • Dameon99
    replied to caloc errors in compile
    in C
    im still trudging away with the code.. after the changes now I am getting a very similar message for the same code sections.

    invalid conversion from void* to int*

    I still dont understand..
    See more | Go to post

    Leave a comment:


  • Dameon99
    replied to caloc errors in compile
    in C
    Thanks, I feel that I am getting closer to a solution. I copied and pasted this into my code but still no banana. it wouldnt compile saying that there was too many arguments for calloc. could you please put fill in a bit more on the syntax and Ill try it again? are there supposed to be commas somewhere in the calloc parametres (like: "*matrixPoi nter = calloc(rows, * sizeof(int));") ?

    my code as it stands now is:
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...