15,550 Topics

Member Avatar for
Member Avatar for sbcro

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!

Member Avatar for orwell84
0
185
Member Avatar for .It.

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?

Member Avatar for biswajit_cs07
0
122
Member Avatar for geoffy0404

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 …

Member Avatar for jephthah
0
139
Member Avatar for jhong12

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

Member Avatar for bobbyg23
0
70
Member Avatar for mktr

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 …

Member Avatar for Narue
0
7K
Member Avatar for vineeshvs

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)

Member Avatar for Akash Saikia
0
149
Member Avatar for vdx

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 …

Member Avatar for biswajit_cs07
0
197
Member Avatar for protas

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 …

Member Avatar for biswajit_cs07
0
173
Member Avatar for jayzee1989

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 …

Member Avatar for Momerath
0
234
Member Avatar for s.subbarao

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 …

Member Avatar for orwell84
0
108
Member Avatar for shinsengumi

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 …

Member Avatar for davidchilders
0
264
Member Avatar for jayzee1989

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 …

Member Avatar for jayzee1989
0
122
Member Avatar for vineeshvs

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?

Member Avatar for vineeshvs
0
321
Member Avatar for george61

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 …

Member Avatar for george61
0
868
Member Avatar for Dionysus

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 …

Member Avatar for James Lloyd
0
989
Member Avatar for jayzee1989

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 …

Member Avatar for WaltP
0
135
Member Avatar for harikrishna439

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.

Member Avatar for WaltP
0
72
Member Avatar for zetologos

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 …

Member Avatar for jnawrocki
0
130
Member Avatar for TimBob12

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 …

Member Avatar for Layosh
0
3K
Member Avatar for jephthah

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: …

Member Avatar for Ancient Dragon
0
484
Member Avatar for ankur_

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.

Member Avatar for Ancient Dragon
0
104
Member Avatar for shinsengumi

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 …

Member Avatar for shinsengumi
0
190
Member Avatar for fazdhli

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 , …

Member Avatar for jnawrocki
0
181
Member Avatar for geoffy0404

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 …

Member Avatar for mtatadotcom
0
96
Member Avatar for xiaoberry

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 …

Member Avatar for WaltP
0
195
Member Avatar for jayzee1989

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 …

Member Avatar for jayzee1989
0
107
Member Avatar for rockerjhr

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 …

Member Avatar for rockerjhr
0
213
Member Avatar for cpiody

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 …

Member Avatar for cpiody
0
106
Member Avatar for TigrisAltaica

[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 …

Member Avatar for TigrisAltaica
0
152
Member Avatar for atticusr5

hello all, i am having a real hard time tracing down a logic problem and am looking for help. this program just does a binary search on a sorted list and returns a record. now it works for records that exist. however, i want it to continue searching until an …

Member Avatar for atticusr5
0
109

The End.