15,551 Topics
| |
So yeh, I'm kind of new to c :). So, as far as I know, and array initialized to 0 will stay at 0 unless something is stored by some other function or command. so I have and array here(imgSet) that when I tell my program to print out elements … | |
Hi, I am trying to draw some rectangles by pressing the mouse button and dragging. Each time a new rectangle is being drawn, the previous one disappears. The question is how can I avoid this? I am programming in C. Thanks! | |
Hi all, what is the best way to obtain all the possible 3-items groups out of 8 elements (0-7) with repetitions? This would be D'8,3 = 8^3 = 512 groups. I want to save them in an array, like [CODE]unsigned int array[512][3];[/CODE] What is the best approach? | |
if the answer is 90 through 100 it displays an A if the number is between 80 and 89 it will Display a B, but if its any number less then that it wont work. what am i missing? [CODE]if((int) total >= 90 && total <= 100) { printf("%c \n … | |
i am making a program that will get the area of a rectangle and tell whether the answer is a prime no. or not. which i failed plz. help me | |
i have a simple question: I want to define a hex character array in C, but I don't want to have to define the elements one at a time. my programme needs an hexadecimal array as input of 128 bits. for example, [code=c]unsigned char temp2[32]= {0x00 ,0x11 ,0x22 ,0x33 ,0x44 … | |
i want to write a function to which i need to pass two matrices and get the sum and product of them as output. but how can i return more than one matrix from a function? (i want to pass and return using pointers) | |
Dear friends, I am trying to compile the linux kernel 2.6.33. I need to incorporate a patch into this. The patch creates a directory and 3 src files as below, [CODE] ~/linux-2.6.33/net/core/[B]netchannel[/B] ~/linux-2.6.33/net/core/[B]netchannel/netchannel.c[/B] ~/linux-2.6.33/net/core/[B]netchannel/storage.c[/B] ~/linux-2.6.33/net/core/[B]netchannel/users.c[/B] [/CODE] Now, among the above users.c file uses a function named 'get_empty_filp()', which is defined … | |
Hi all, I was making a program as one of our activities. The output should be something like this: [IMG]http://img10.imageshack.us/i/ss1qh.jpg/[/IMG] When I press on Display Output, it should look like this: [IMG]http://img29.imageshack.us/i/ss2pa.jpg/[/IMG] However, when I have to Insert a record, the added record should be added on the record when … | |
so, im trying to setup a rule that would "update" lower array indexes with higher ones if the array is full and something needs to be stored ex( [ICODE]imgSet[x]=imgSet [ x + 1])[/ICODE]) but I get ''[B] error C2106: '=' : left operand must be l-value[/B]' I try moving items … | |
Hi, i want to develop an one final solution to the problem COMPUTER VIRUS. my idea is that to develop an antivirus like software.its not an anti virus but its more better than that. every anti virus softwares like avast,ca, quickhil,kaspersky..... have some drawbacks. to avoid it i want to … | |
Hi all. I'd like to ask for a way to store a MySQL table content of type VARCHAR to a CHAR variable in C. The MySQL table has three columns: ID (int), Name (varchar(22)), Salary (int). My C program should ask the user to input an ID number, and depending … | |
So, have a program I'm working on and so far things seem like they are going like they are supposed to except one thing. When I print the menu for the user and they input something, if the input is not the input for exiting the program, it prints the … | |
1. any problem if i dynamically allocate memory and use only a small part of it? 2. can i free the dynamic memory after each time the function is executed? | |
In the following problem I have to find the number > 40755 which is triangular,pentagonal and hexagonal. The formulas for these type of numbers are given below. As I read every hexagonal number is also triangular so we have to compare pentagonal with hexagonal numbers. This algorithm gives 9 digit … | |
Hi I was hoping if anyone could help me figure out what im doing wrong. I wanted to delete a specific line in a text file using fputs...I dont know why it isn't writing on the textfile in other cases it only writes in the end of the file..' heres … | |
So, i have to create a program to work with a menu and run differect functions with different letters used as commands, but I cant get my program to correctly Identify if a menuinput is the same as a letter or the other. Here I keep using the letter L … | |
Hi, Big 'i' and small 'L' are looking same when I type it in google, how can it differentiate these two? Is it only by ASCII value or any other reference? Any answer could be appreciated. | |
I was assigned to make a int to binary converter. I made one and it work as it should however when attempting to make a char pointer and print the char array the pointer is pointing to it print weird character which I am guessing is the memory location. Am … | |
Hi there, I am coding for an engine based on C that supports everything apart from arrays. Now what I want to do is this: [code] int Populate(int Amount, string TagArray[], float xLoc[], float yLoc[], float zLoc[], float Orient[]) { int AutoInc = 0; while(AutoInc < Amount) { int a … | |
so there's an argument about best practice for #include statements. many people put all the relevant #include <header.h> statements at the top of the .c source code. some people prefer to put the relevant #include statements within the .h header file that is associated with the .c source code consider: … | |
I am using qcheck=all while compiling my makefiles. When I am running the binary file generated then it is converting integer to a double value For eq: 612 to 612.0 Can anybody help me to know the reason why? Regards, Ankur. | |
Hi everyone! Is there a way/command in C to find a string that is contained in a longer string? I'm currently developing a C program in Windows that sends requests to a machine and gets its response through socket programming. The response is an image in jpeg/jfif format. The whole … | |
Hi Sir/Madam, Need your help again, i failed to do output display for the menu list from this code. Suppose the output have to come out with menu = item selected, tax and amount of item. [CODE] #include<stdio.h> #include<string.h> #include<stdlib.h> double price[8] = {2.50 , 3.45, 2.20 , 2.95 , … | |
i got an if statement that will display the letter A and the percent grade if there percent grade is between 90 and 100. and the else statement will do the same but its display a B if the grade is between 80 and 90, my problem is, even if … | |
I just need a help regarding this problem: a user is asked to enter two fractions, and the program should print the following -maximum -sum -product Output should be in proper fractional from and should be in lowest terms. The program must be able to identify if the numbers entered … | |
so im begining some project, and to try to check my work im trying to print out results as of point x to see whats going on. I just started and im already stuck, and I cant find any reason why I am getting an error. Here im trying to … | |
I need to use mergesort to sort the data in a file that has the names and ages of 10 different people , first i have to sort the names in ascending ascii order and then i have to sort them by their age but im not sure how to … | |
Hi, sorry to post about a bus error I realize there are many answers on others threads but none of them have been able to help me make sense of this problem. Im fairly new to C and have tried everything I can think of. The program is supposed to … | |
[CODE]#include <stdio.h> #include <math.h> FILE *input, *output; main() { int Max, Min, x[1000000],i=1,n=0,j=0; input = fopen ("Nube_de_Caminantes.txt","r"); n=getw(input); while (n !=EOF) { fscanf(input, "%i",x[i]); i++; n = getw(input); } fclose(input); }[/CODE] There is some stuff I need to do with the array once I have it, but I can't get … |
The End.