zeroliken 79 Nearly a Posting Virtuoso

you need to be more specific about the problem your having
is there a specific error in your code or do you need suggestions on how to get started

zeroliken 79 Nearly a Posting Virtuoso

Back in the old forum there used to be a list of admins and mods

Also Can I ask if you know what happened to Narue?

zeroliken 79 Nearly a Posting Virtuoso

what's the specific problem that you need help with?

Input is the address of a folder containing images

read either of these
http://docs.oracle.com/javase/tutorial/2d/images/loadimage.html
http://www.particle.kth.se/~lindsey/JavaCourse/Book/Part1/Java/Chapter06/images.html

Output should be a jframe displying first image in a folder when i scroll mouse or press right arrow key then next image should be displayed Similary when i scroll back or press left key the previous omage should be diplayed on jframe

read the mouselistener and mouse-Wheel listener class and tutorial from the oracle docs
http://docs.oracle.com/javase/tutorial/uiswing/events/mousewheellistener.html
http://docs.oracle.com/javase/tutorial/uiswing/events/mouselistener.html

zeroliken 79 Nearly a Posting Virtuoso

What have you coded so far? is there a specific problem you need help with?

zeroliken 79 Nearly a Posting Virtuoso

Is there a specific problem or question about that we could help you with?

zeroliken 79 Nearly a Posting Virtuoso

other than the brackets did you already fix those variable initializations like what I said?

don't initialize variables inside a loop/condition

zeroliken 79 Nearly a Posting Virtuoso

when i add again a } at the end,the error now is 1

"error:class,interface,or enum expected"

you added an unnecessary closing bracket, check all the brackets again

zeroliken 79 Nearly a Posting Virtuoso

,and errors become 29.....

don't initialize variables inside a loop/condition

zeroliken 79 Nearly a Posting Virtuoso

In the changes you made did you check if you have a closing bracket for the public class?

zeroliken 79 Nearly a Posting Virtuoso

If you just need suggestions on how to get started then I suggest you read about structures and file i/o in C
other than that if you have a specific problem or error with your code then you could post it here then we'll help

zeroliken 79 Nearly a Posting Virtuoso

@ the function

for(int i = 0; i > nrEle ; i++){
for(int j = 0; j > nrEle; j++){

what's the value of nrEle that you passed to the function? if the value nrEle is less than the value of i and j then it will loop continuously and if the value of nrEle is greater than i and j then the condition won't be met to start the loop

zeroliken 79 Nearly a Posting Virtuoso

include the header string.h for string functions like strcmp

as a sidenote I'd suggest that you avoid using goto, instead you could use simpler methods like a switch condition

zeroliken 79 Nearly a Posting Virtuoso

i need to display the numbers 1 to 9 randomly but they cannot be repeated!

you could save the random number in an array, when you create a new random number check the elements of the array if the random number generated is already given then create a new random number (use a loop so you can check every time if a number is given already)

zeroliken 79 Nearly a Posting Virtuoso

Sorry but we can't do your homework for you
If you have specific questions or problems on any of the following then you can post your pseudocode here and that's where we'll help you

zeroliken 79 Nearly a Posting Virtuoso

try passing the array like this

  squeeze (c, S); 
  printBackwards (S);

well as for my previous comment
for the char array/string I was checking if you wanted to use a char or a string for it's values
anyway did you remove the & if your going to use a string

zeroliken 79 Nearly a Posting Virtuoso

to do it
highlight all of your code and press the Code button or simply press tab from your keyboard

also are there any error messages for your code, could you post that as well or if not describe what happens when you run it

zeroliken 79 Nearly a Posting Virtuoso

@line 17
why did you use %c as a parameter when you want to take a string shouldn't that be %s

zeroliken 79 Nearly a Posting Virtuoso

You have missing braces.

No, he have all the brackets needed at the previous code posted
if your referring to the else condition's bracket then it's found at the end on line 29

zeroliken 79 Nearly a Posting Virtuoso

a whole different set of ascending numbers after the sort

for(i=0;i<s;i++){
a[i]=rand()%100+1;}

the values you assign to the array are different than the values you displayed on the previous while loop
print the values of the array in this loop to see

dij_0983 commented: right +2
zeroliken 79 Nearly a Posting Virtuoso

you need to fix the opening and closing brackets for your conditionals like the if conditions and while loop to tell which statements are included in each

zeroliken 79 Nearly a Posting Virtuoso

I am looking for a code to ask the user to input a string int a function.

research scanf(), strings, i/o, in c on the web and you'll find lots of examples

I'll be taking a computer science class next year and I try to
do some understand some basics.

check the tutorials here http://www.daniweb.com/software-development/c/threads/50370/starting-c-

dij_0983 commented: been trying to find tutorial link for a while already +2
zeroliken 79 Nearly a Posting Virtuoso

judging from the code you posted most of the variables have no value yet your trying to print them?

zeroliken 79 Nearly a Posting Virtuoso

could you post the details of those error message

judging from the code you posted there shoudn't be any error regarding input

zeroliken 79 Nearly a Posting Virtuoso

if someone would read over it and tell me what I did right/wrong

is there a specific problem in your program? maybe an error message or it's not outputting what it suppose to

zeroliken 79 Nearly a Posting Virtuoso

I jave an assigment to find a java programm to modify it?

do you mean open a java document using a C++ program and modify it's content

can someone help me pls ?

what exactly do you need here
have you coded anthing so far?
is there an error in your program?
can you be more specific?

zeroliken 79 Nearly a Posting Virtuoso

use opening and ending brackets for the while loop also why are there semicolons before the end of the parentheses' nested if conditions

other than that could you post those error messages here and maybe some important parts of the code where an error could be found like the main function

zeroliken 79 Nearly a Posting Virtuoso

got it to work with windows using cygwin and linux gcc...
is there a specific error or output that happens when you compile or run the code?

zeroliken 79 Nearly a Posting Virtuoso

your program might have used a function or a variable which is not defined in any of the object files or libraries supplied to the linker.
this might have been caused by a missing library or using an incorrect name

zeroliken 79 Nearly a Posting Virtuoso

try something like this:

  char *array[3];
  char x = 'a', y = 'b', z = 'c';

  array[0] = &x;
  array[1] = &y;
  array[2] = &z;

  for (int i=0; i< 3; i++) 
      printf( "%d = %c\n", i, *(array[i]) );
zeroliken 79 Nearly a Posting Virtuoso
  1. you forgot to include the variable degree in the argument after printing out insert the number of coefficients
  2. why did you manipulate the value of degree in the for loop at the get_poly function to always increment?
zeroliken 79 Nearly a Posting Virtuoso

you need to remove the trailing new line so that it won't end up in an infinite loop try using getchar for this
here's an example

int i , x, n=5, ch;
            for(i=0;i<n;i++)
            {
                if ( (scanf ("%d", &x)==1) )
                    {
                        printf("Integar is entered\n"); 
                    }
                else
                    {
                        printf("Please enter an integer\n");
                        i--;
                    }
            //Clean up the stream (assumes everything left is garbage
               while ((ch = getchar()) != '\n' && ch != EOF)
                  {
                   // All work done in the condition
                  } 
            }

If the user should enter only integers not floats

I doubt the above code will work in detecting floats, for that you need to check for the enter key
here's an example

int number;
char enter;
printf("\nEnter number: ");
if(scanf("%d%c", &number, &enter) == 1 || enter != '\n'){ // enter is used to catch the enter key when pressed
    printf("you did not enter an integer number");   

}
else{
    printf("valid integer followed by enter key\n");    
}

though you can't use this inside a loop

zeroliken 79 Nearly a Posting Virtuoso

You could simply print out the current array after a swapping is done

zeroliken 79 Nearly a Posting Virtuoso

once a number is found you need to continue to move the next contents of the array until the last element so that there won't be a repeated value

zeroliken 79 Nearly a Posting Virtuoso

Did you check the security tab in the properties of the folder to see if you have full control over it or the account your using has a permission to it

zeroliken 79 Nearly a Posting Virtuoso

a simple solution would be to insert new nodes in a linked list where the nodes that will be created would resemble the nodes present in the second linked list

zeroliken 79 Nearly a Posting Virtuoso

But what if I want to display or print the passes that happened during the loop

you could print out the variable you need to display before passing it to a function or doing something to it

other than that if you need something else entirely then could you post a sample code of what you need so I can understand it better

zeroliken 79 Nearly a Posting Virtuoso

and plugged it in the fgets parameter and it worked...now my problem is how to get the file size

I Doubt you need the actual file size for reading every line just make sure that the array size and number of char to be read by fgets is enough for every line

zeroliken 79 Nearly a Posting Virtuoso

I have a problem. If the text is too long in the text file...the program crashes. How to solve it?

IF the texts inside the text file are within the number of characters to be read in fgets() and is within the length of the array then this is not the problem,

I am storing the strings (spaces included)

it's already being stored in the string search (line by line with space included)

moreover I cannot reproduce the same problem ,could you post a sample output of the program

zeroliken 79 Nearly a Posting Virtuoso

how did you read the text could you post the code here?

zeroliken 79 Nearly a Posting Virtuoso

It can read the first line just fine
quick question why are you using fgets twice?

zeroliken 79 Nearly a Posting Virtuoso

welcome to Daniweb

Sorry but we don't give away code here
we'll be able to help if you post your code and we'll help fix the problem with it or do you just need suggestions to start off?

zeroliken 79 Nearly a Posting Virtuoso

How Do I Copy This Code ? xD?

Double click on the code snippet posted

Also, there should be # marks in front of your include statements.

Actually there is a # in his original code it's just that it wasn't indented with four spaces or inside the "Code blocks" so this was interpreted as a heading :)

zeroliken 79 Nearly a Posting Virtuoso

Is there a specific question you'd like to ask or what's the next step that you need suggestion with?

zeroliken 79 Nearly a Posting Virtuoso

Ok, they're back! Sorry for the long wait guys.

thank you :)

zeroliken 79 Nearly a Posting Virtuoso

@line 40
pass the array like this:

BubbleSort(arr, num);

@line 41
are you trying to print the whole array? you could use a loop for that

zeroliken 79 Nearly a Posting Virtuoso

use a FILE pointer which will let the program keep track of the file being accessed
for example it's

FILE *pFile;

but I can't seem to check if this code is correct since I can't compile it well.

if you can't compile it well isn't that a sign that there's something wrong already :)

zeroliken 79 Nearly a Posting Virtuoso

check to see if a comment was left -- no comment, no change to rep points

yes there was a comment left, how could I have known that it came from you if there were none, lol ;)

Note that all votes are created equal in the new system, and a vote without rep still counts toward the 24 hour lock on rep power. So if for example, AD gave one of your other posts an up vote without a comment and then voted with a comment on another post, the second vote would not apply any rep because the first vote put a 24 hour lock on AD's rep power against you.

tested it and your right simply voting without commenting would lock the rep power already

Hmm ... I think this is actually a bug. The problem is that it's not going to be an easy one to fix at all, since the system was designed to only store whether or not you voted and not whether or not you voted with a comment in the posts table.

I see, good luck then :)

zeroliken 79 Nearly a Posting Virtuoso

i have to make a function that reads line per line either using fgets or fscanf and translate it to c.

something like this then:
http://www.daniweb.com/software-development/c/code/216411/reading-a-file-line-by-line

example my first line in virtual.txt is int x; so I have to create something that detec that integer
and create one.
then the printline and so on, I think this is call tokenizing(something like it)

it would be tokenizing if your going to further divide the strings from the lines,
check some examples using strtok from the string.h header

zeroliken 79 Nearly a Posting Virtuoso

if someone can show me how to read a txt

this can be done in lots of ways, I suggest searching for examples using fgets, fscanf, fread etc.

make c do a command

what command?

zeroliken 79 Nearly a Posting Virtuoso

at 1,000 posts my user title at the left still says that I'm still a practically a posting shark though my profile shows that I'm now a veteran poster

also I did not receive any rep points from AD(twice) and Eagletalon when they commented on my post at the C, C++ and Windows forum even though they have a +14 and a +3 power to affect someone elses reputation