775 Posted Topics
Re: What exactly is the OS you're using? 7 or vista Anyway Here's something I found from the [URL="http://windows.microsoft.com/en-US/windows7/Sleep-and-hibernation-frequently-asked-questions"]Windows FAQ[/URL] A program or scheduled task might be waking your computer. By default, Power Option settings do not allow scheduled tasks to wake the computer from sleep or hibernate. However, some programs … | |
Will there still be HTML code snippets of our Daniweb member badges where we can copy and include it in our websites? | |
Re: @line 17 why did you use %c as a parameter when you want to take a string shouldn't that be %s | |
Re: 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 | |
Re: >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 | |
Re: >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 | |
Re: 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 | |
Re: 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 … | |
Re: >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. … | |
Re: judging from the code you posted most of the variables have no value yet your trying to print them? | |
Re: 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]) ); | |
Re: could you post the details of those error message judging from the code you posted there shoudn't be any error regarding input | |
Re: >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 | |
Re: 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 | |
Re: >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 … | |
Re: 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? | |
Re: 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 … | |
Re: @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 | |
Re: 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 | |
Re: how did you read the text could you post the code here? | |
Re: 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 | |
Re: It can read the first line just fine quick question why are you using fgets twice? | |
Re: 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? | |
Re: >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" … | |
Re: Is there a specific question you'd like to ask or what's the next step that you need suggestion with? | |
Re: 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 … | |
Re: the constructor and methods should look a little like this public class find { int[] array; public find(int[] array){ } public int findmax(){ ... return max; } public int findmin(){ ... return min; } } | |
Re: you need to decide wether to use file i/o in C or C++ for C++ read this: [http://www.cplusplus.com/doc/tutorial/files/](http://www.cplusplus.com/doc/tutorial/files/) for C read this: [http://www.cprogramming.com/tutorial/cfileio.html](http://www.cprogramming.com/tutorial/cfileio.html) | |
Re: >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? | |
Re: Do you already know how file i/o works? if not you can start at these java docs [http://docs.oracle.com/javase/tutorial/essential/io/](http://docs.oracle.com/javase/tutorial/essential/io/) | |
Re: you could also add a [MouseListener](http://docs.oracle.com/javase/tutorial/uiswing/events/mouselistener.html) to every component where an image is shown (maybe a JPanel or JButton) and whenever they are pressed set the background image to the frame depending on which image is clicked | |
Re: you can only return a value similar to the function's data type instead of returning a boolean value you could pass by reference the boolean variable to change it's value accordingly | |
Re: @ line 6 your assigning a value to the null terminator of the matrix > i want the elemnets of every matrix is random number using time function instead you should make a nested loop that traverses it's indexes and inside that loop it assigns a random value for the … | |
Re: here's an example I found [http://stackoverflow.com/questions/1854870/manually-sorting-a-linked-list-in-java-lexically](http://stackoverflow.com/questions/1854870/manually-sorting-a-linked-list-in-java-lexically) | |
Re: I completely agree with using fgets() over scanf() sigh... I'm bored and there's a lack of new articles for me to post so here's a workaround for scanf that uses character classes int main(void) { char string[100]; scanf("%[a-zA-Z0-9+-*/=%.,?!:; ]s", string); printf("%s\n", string); return 0; } NOTE: It won't be as … | |
Re: could you post your current code now with main | |
Re: traverse the array using a loop when a character x is found convert the digit before the x using atoi() then save it temporarily to a variable then check the operation after the "x" after that check the next elements for the x and do the same for example: 2x+3x … | |
Re: maybe you need to try to close the file to save what you wrote | |
Re: >i am really not sue how to add in the .56 probablity thing here's one way: considering that you know how to use rand() you could randomize a value from 0 to 99 and if it lands between 0-55 player ada wins else if it's 56 - 99 the other … | |
Re: 1. If the node to be swapped is found on the head a. create a temporary pointer and make it point to the node after head b. make the next pointer of the head node point to the next node of the node after head c. make the next pointer … | |
![]() | Re: other than that you could use an overlayLayout 1) create a JPanel and set its layout to OverlayLayout 2) create a new JPanel and add the image to this then add this JPanel to the JPanel created in 1 3) create another JPanel and add your buttons here then add … |
Re: # To create a new node # allocate memory for the new node new_node = (struct node *) malloc( sizeof(struct node) ); next save data for content scanf("%d" , &new_node->data); #To insert# struct node *temp = NULL; //temporary pointer will be used instead of head, head will be a reference … | |
Re: >When I use the suggested code to print the inout data, it tells me that "int Transistors" was not initialized. This means that it wasnt declared in the "int main()"? are you using **exactly** the code posted by AD cause there's no variable Transistors found there >Ancient Dragon, I am … | |
Re: create a constructor in the Goldfish and Dog class that takes a string maybe reading these will help you out [http://docs.oracle.com/javase/tutorial/java/javaOO/constructors.html](http://docs.oracle.com/javase/tutorial/java/javaOO/constructors.html) [http://www.javaworld.com/javaworld/jw-10-2000/jw-1013-constructors.html](http://www.javaworld.com/javaworld/jw-10-2000/jw-1013-constructors.html) | |
Re: could you post your code so we may see what you did | |
Re: if you mean you need help concerning a virus or something similar? then yes if either crunchie or PhilliePhan or anyone else who can read logs from MalwareBytes is available today | |
Re: save it to the address of c make that: scanf("%c",&c); | |
Re: I believe there's already a builtin getline function in stdio.h try to rename the function and all instance that uses the same name | |
Re: Scanner console = new Scanner(System.in); include this in the main method and remove static | |
Re: The problem isn't the first letter of the string your comparing the null terminator of both strings which is equal @line 6 remove the +1 from strlen @line 13 change the condition to count<length (compare only the last letter value) |
The End.