19,876 Topics

Member Avatar for
Member Avatar for dondulla

hi, unfortunately i need a bit of help with a config for a program that an ex-employee of ours wrote. Basically, the program verifies itself on a website and verifys one specific type of bluetooth hardware is connected. we have recently changed hardware suppliers and need to take the requirement …

Member Avatar for NicAx64
0
117
Member Avatar for timaquerra

Hello, I have a program which searches for (using binary search) specific word in ordered list and counts number of comparisons it makes until it finds the target! My problem is: how can I count average of number of comparisons? Here is how searching function works: [CODE] int binary_search(char *array[], …

Member Avatar for kolosick.m188
0
77
Member Avatar for chet6

Hi, Could anyone please explain how the memory allocatio is done in case of double pointers?

Member Avatar for manutm
1
137
Member Avatar for dipisahu
Member Avatar for aman rathi

hello i am a student of sgrrits dehradun doing bca now a days my pointers chapter is going on its difficult to understand but mostly i did it but i want to know that how it is use ful for us in the c. i only find its 1 benefit …

Member Avatar for jbennet
2
118
Member Avatar for GagandeepKaur

Hi, im trying to calculATE DFT through this code, i dnt know what's wrong please enlighten. Thanks [CODE]#include<conio.h> #include <math.h> #include <complex.h> main() { int m,n,r,N,j; float l,o; float complex x[1000]; float real, imag; { for (m=1;m<=10;m++) { for (n=1;n<=10;n++) { for (j=1; j<=10;j++) N=1000; r=1/N; l=sin(3*j); printf("the value of …

Member Avatar for GagandeepKaur
0
205
Member Avatar for varun_p_n

I have a com component that logs error details. I wan't to delete the log files that were created one month back. Where this code has to be written ? I mean it should be run only once when the COM compponent is loaded for the first time.

Member Avatar for Ancient Dragon
0
397
Member Avatar for leeba

I am trying to write a program that reads a string and shortens it if the letters are in a row. For instance abcdghigjhkhdf becomes a-dg-igkhkhdf. I want that it erases the ;etters it erases but it is not working. HEre is my code: [code] #include <stdio.h> #define MAXSTRING 100 …

Member Avatar for kommuru
2
67
Member Avatar for racumin

Hi, in java, I can use packages to combine classes which have similar traits. For example, I have a package "worker" and classes in this package contains "Programmer.java" and "Designer.java" I want to know how to do this in C++. What I did was this: 1. created a source folder …

Member Avatar for Ancient Dragon
0
96
Member Avatar for danibootstrap

Hi, Is there a way to write code or do functions exist for keypress down and keypress up of the keyboard.There are functions for mouseleft button down and mouse left button up.Is it possible with keyboard keys in windows?Like "Alt"+"F" etc... Any sample code or resource would greatly help.Thanks in …

Member Avatar for Ancient Dragon
0
103
Member Avatar for redroze

hello guys, I get this error MSG and I can't understand what is the problem with my code. my program consist a menu with 5 options: 1. The program remove double digit from a given number. 2. The program rotate the first number to the right according to the second …

Member Avatar for kommuru
0
74
Member Avatar for timaquerra
Member Avatar for hosh

Hi i'm trying to compile this code, but getting warning. need some help to understand what I'm doing wrong. void printGraph(FILE *out, GraphRef G){ out = fopen (out, "w"); if( out==NULL ){ printf("Unable to open file %s for writing\n", out); exit(1); } } warning: passing arg 1 of `fopen' from …

Member Avatar for Aia
0
84
Member Avatar for vijaykalmani

Please help me on 1) C++ pgm to reverse a linked list 2) Given 2 lists L1 & L2, create a 3rd list which is intersection of L1 & L2 3) Given an infix evaluate it without converting it to postfix (hint use 2 stacks)

Member Avatar for vijaykalmani
-2
101
Member Avatar for danibootstrap

Hi , Is there a way that I can draw lines or circles etcc..(graphics) onto windows screen? Please let me know.Sample code would greatly help.

Member Avatar for Ancient Dragon
0
329
Member Avatar for gogodr

I'm developing a 3D Board Game based on the World of Warcraft miniatures board game. I don't know what's wrong ... the game runs and the system is like this I have a model that can move in a map through Cells I made a procedure so you click and …

Member Avatar for gogodr
0
152
Member Avatar for eswar.aspire

hi, Can any one help me about clock problem..i need to calculate the exact execution time of algorithm using the processor clock speed not the wall clock time..i am getting zero by using the clock_t function in time.h.also how can i calculate the exact processor speed execution of program..reply me …

Member Avatar for AuSsIeStOnE
1
104
Member Avatar for AuSsIeStOnE

[B]fseek()[/B] and [B]ftell()[/B] work only for files < 2,147,483,647 bytes [B]fseeko64()[/B] and [B]ftello64()[/B] from [B]<stdio.h>[/B] can deal with files up to 18,446,744,073,709,552,000 bytes the printf format for unsigned long long val is [B]%I64d[/B] eg. Obtaining the file dimension (this code was tested with [B]GNU GCC compiler[/B] (MinGW/Cygwin) from code::blocks)

2
488
Member Avatar for vampgirl13

Hi, I was wondering if anyone can help me translate this into java. Thanks [CODE]#include "Element.h" #include <stdlib.h> element * Element(int s1, int w1, double c1, int x1, int k1) { element * retval = malloc(sizeof(element)); retval->s = s1; retval->w = w1; retval->c = (float) s1 / (float) w1; retval->x …

Member Avatar for vampgirl13
2
112
Member Avatar for ybean4

stdio.h only includes function declarations. Where does the compiler look for the function bodies?

Member Avatar for kommuru
0
61
Member Avatar for voxis

What is the method to remove dupplicate items from an character array?? A Sample Program is Here which take two arrays merge them and sort them please include some lines that should remove duplicates from an resulted array?? [code] #include <stdio.h> // A simple bubble sort void sort(char data[], int …

Member Avatar for kommuru
0
796
Member Avatar for speedy94519

My code: [code] printf("\n"); printf("\tSlalom Race, Version 1.0\t\t\n\n"); printf("1. Play\n"); printf("2. Instructions\n"); printf("3. Quit\n\n"); printf("Your choice: "); scanf("%d", &choice); } /* Initializes loop to begin game */ while (choice != 3) { /* Begins execution of game and Selects instructions if needed */ while (choice == 1) { printf("You are …

Member Avatar for kommuru
0
83
Member Avatar for neithan

Hi, i'm facing a weird behavior in this code that i just wrote. It was supposed to read a string from stdin and just write it out. I've debugged it and for me it reads perfectly, but in the while (line 38), *p just seems to be taking weird chars …

Member Avatar for gerard4143
0
155
Member Avatar for xacronyx

Hi! Does anyone know how can I make my own defragmentation tool in C# ? (similar with the windows one).

Member Avatar for xacronyx
0
48
Member Avatar for danibootstrap

Hi, I want to write code for opening an external file or program from the C program.Could anyone tell me how to do this? Say if I want to open calculator.exe I mention the path in the program and it should open it or say if I want to open …

Member Avatar for danibootstrap
0
279
Member Avatar for Wtyy

How to print this pattern use "for" ??? [IMG]http://ser1.share.ysk.cc/upload/photo/20091112/754158.JPG[/IMG] :?::?::?:

Member Avatar for Wtyy
0
89
Member Avatar for siggivara

I've written a method that takes a variable number of arguments. My problem is that the method is supposed to do one thing if there is only one argument, and something different if it recieves multiple arguments. If it's one argument I'm supposed to get info from a global variable, …

Member Avatar for siggivara
0
188
Member Avatar for bufospro

Hi, I would like to make a database with users. But I take errors in the function Could someone help me please? My code is : [CODE]typedef struct user user; int id2=0; struct user { char name[20]; char last[20]; int id; }; int function(user* users, int id, char name[], char …

Member Avatar for bufospro
0
93
Member Avatar for Pim

Hello, [code] #include <stdio.h> int main(void) { enum BOOL {foo, bar}; enum BOOL bFlag; return 0; } [/code] When I compile this and run it AntiVir claims it's the TR/Eplx.IMG-WMF.bfg trojan. Isn't that weird?

Member Avatar for Ancient Dragon
0
52
Member Avatar for furqankhyraj

dearest i want to make a program in which i want to move a "%" to each side of a screen so how could be made please help earlier

Member Avatar for sapan645
-1
136
Member Avatar for roger.hungchan

I don't know how to write a c++ program to execute the following operations. could anyone help me?? Write a C++ program that opens a comma-separated values file and performs various functions on it. The first line is a header containing the names of the fields. The available fields are …

Member Avatar for Ancient Dragon
0
129
Member Avatar for BosByte

Hello, Please take a look at this well-known 'problem': [CODE]class A{ B * foo(); }; class B{ A * foo(); };[/CODE] Its solution is simple: add "class B;" above A. But I've got a smilar, but more complex, problem: [CODE]class A_1 { virtual B_1 * foo(); }; class B_1{ virtual …

Member Avatar for StuXYZ
1
110
Member Avatar for kgomes

In an assignment for class we have to ask the user how many characters they'd like to enter and then read the characters into an array of that size. I've had problems with calling a function to do this. I will also be passing this array to other functions, so …

Member Avatar for gerard4143
1
96
Member Avatar for bufospro

Hi, I need your help for my program. My code is : [CODE] void user() { char str[15]; int i=0; do{ printf("\nPrint str.\n"); fgets(str,15,stdin); i = strlen(str); }while(i>15); } void menu() { printf("Press :\n"); printf("0. \n"); printf("1. \n"); printf("2. \n"); } int get_choice() { int choice = 0 ; const …

Member Avatar for bufospro
0
133
Member Avatar for pmee

Hi, I'm new to this site so apologies for any mistakes. I'm trying to write a program to parse string from a file. In each string I then have to parse the different strings for example: add h'13', 4 So I've to parse the 'add' bit, the '13' bit and …

Member Avatar for pmee
1
102
Member Avatar for harshchandra
Member Avatar for cabosun

I am suppose to make a MakeFile for the 2 source files named p4a.c and p4b.c Am i doing this makefile correctly? Any suggestions would be so helpful my MakeFile so far [CODE].SUFFIXES: .c .o CC - gcc CFLAGS = -g .c.o: $(CC) $(CFLAGS) -c $, sample: p4a.c p4b.c gcc …

Member Avatar for gerard4143
0
116
Member Avatar for hapyharra
Member Avatar for gerard4143
0
163
Member Avatar for candoc

If I am fread()'ing through a file and want to append it when i find a particular item, can i just do an fwrite() when i find it or do i have to first fseek() to that location and then do an fwrite()?

Member Avatar for Tom Gunn
0
117
Member Avatar for want_to_code

[B]Given an array of elements. An element is called as a leader if it is greater than all the elements to the right of it. Print all the leaders in O(n)?[/B] The following is my approach.Can anyone tell me how to improve the code and also the current time complexity? …

Member Avatar for thines01
0
121
Member Avatar for henabibi

I am trying to run this program but it is giving "unable to open socket" eror. i am running this program on a server via putty which is hosted in my univerity server with wireless network. the code is : [code=c]#include <pthread.h> #include <netinet/ip.h> #include <netinet/tcp.h> #include <stdlib.h> #include <sys/socket.h> …

Member Avatar for Nick Evan
0
183
Member Avatar for LennieKuah

[B]Hullo there,[/B] [B]C#Net 2003 Window Application [/B] I need your help again. I am trying to loop through the DataGrid rows and confirm that FirstColumn which hold Checkbox is TRUE. If it's TRUE, I need to retrieve the Customer FirstName(2nd Column) and LastName (3rd Column) and transfer the data onto …

Member Avatar for Geekitygeek
-1
308
Member Avatar for leeba

I am trying to write a program that accepts a dollar rate and hte accepts a list of amounts adn converts tehm to Shekels and prints in a list with the sums. HEre si my code: It is giving em lots of errors and I am having no luck. I …

Member Avatar for leeba
1
91
Member Avatar for tux4life

This is a [B]toupper[/B] and [B]tolower[/B] implementation for whole c-strings, without making use of the existing [B]toupper[/B] and [B]tolower[/B] functions for characters :) [U] example:[/U] [CODE=C]char s[]="Hello, beautiful world!"; stoupper(s); // s now contains: `HELLO, BEAUTIFUL WORLD!´ stolower(s); // s now contains: `hello, beautiful world!´[/CODE]

Member Avatar for William Hemsworth
0
3K
Member Avatar for adiaforos

Hello all!! i have to make a program for my university that generates 3000 random numbers and finds the one who are powerful! I have written all of the code but i don't know what condition is wrong! let me show you... :-P [CODE]for (l=4 ; l < COMPUTATIONS ; …

Member Avatar for adiaforos
1
170
Member Avatar for want_to_code

the header file: [code] #include<stdio.h> struct IntArray { int schedule[30000]; int nSize; }; struct IntArray getSchedule(int browsingTime[], int noOfPersons, int timeSlot); [/code] the implementation file: [code] #include"leastremainingtime.h" void sort(int *a,int n) { int i=0,j=0,temp=0; for(i=0; i<n;i++) { for(j=0;j<n-1;j++) { if(a[j] > a[j+1]) { temp=a[j]; a[j]=a[j+1]; a[j+1]=temp; } } } } …

Member Avatar for want_to_code
0
116
Member Avatar for fatalblade

hi everyone I'm trying to listing files/drives/folders in pc but I couldnt find anything. please help me .. --[ cryptacker ]--

Member Avatar for Ancient Dragon
0
146
Member Avatar for Ancient Dragon

This demonstrates how to get a list of your computer's logical drive letters under the MS-Windows operating system.

Member Avatar for Ancient Dragon
2
930
Member Avatar for shakunni

Hey, I needed to delete a file created by a child process and our prof suggested that I use the system() command to do so. I 'manned' system but cant find anything useful on how to use it to delete an opened file. Can anyone suggest as to how this …

Member Avatar for marco93
0
96
Member Avatar for Vishu Madaan

#include<stdio.h> #include<conio.h> void main() { int a[10][10],b[10][10],c[10][10],i,j,k,m,n,p,q; printf("Enter The Rows And Cloumns in the Matrix:"); scanf("%d %d",&m,&n); printf("\nEnter Elements Of The Matrix:\n"); for(i=0;i< m;i++) { for(j=0;j< n;j++) { scanf("%d",&a[i][j]); } } printf("The First Matrix Is:\n"); /* Print the first matrix */ for(i=0;i< m;i++) { for(j=0;j< n;j++) printf(" %d ",a[i][j]); printf("\n"); …

Member Avatar for Ancient Dragon
0
95

The End.