19,876 Topics

Member Avatar for
Member Avatar for nalinibh

Hi everybody, Can anyone among you let me know.how can i find execution time of an algorithm in my c coding!! thanks Nalini

Member Avatar for Ancient Dragon
0
111
Member Avatar for catch_ananya

Hi I would like to know if there is any certification in C available....like Sun certification for Java??

Member Avatar for ~s.o.s~
0
32
Member Avatar for matias.germany

Hi, I have a problem with the function [code]i=(abcdario[g]+h)%27;[/code], because i need to add this, but it gives me the error "invalid operands to binary +" The full code is the following [code] #include<stdio.h> //fopen() ,fclose() #include<stdlib.h> //malloc() int main (int argc, char*argv[]) { FILE *entrada, *salida; int caracter(unsigned char …

Member Avatar for Ancient Dragon
0
128
Member Avatar for MacLeopard

Greetings! I'm wondering if anyone has a kqueue outgoing socket example. What I mean is something that uses kqueue and connects to somewhere (in the example, let's say 1.2.3.4 on port 1234), and then polls the socket and when it gets data, calls the function receive_data(data), with data being the …

Member Avatar for unnameable
0
100
Member Avatar for yulin11

[red][b]Shell Sort[/b][/red] [code] void shellSort(int numbers[], int array_size) { int i, j, increment, temp; increment = 3; while (increment > 0) { for (i=0; i < array_size; i++) { j = i; temp = numbers[i]; while ((j >= increment) && (numbers[j-increment] > temp)) { numbers[j] = numbers[j - increment]; j …

Member Avatar for iamthwee
0
65
Member Avatar for stanats

i'm having this problem and i would like to ask for some ideas on how i will read a file backwards, that is, from end, read the file backwards(forward, naturally) by line.. thanks

Member Avatar for echobase
0
2K
Member Avatar for Dejai

Hello everyone this is my first post on this forum... Though I am a member of several. Just thought I would share some information with all the people out there who want to know more about c++ game programming. Firstly if you want to make graphical games you need something …

Member Avatar for jbennet
0
94
Member Avatar for richie2021

[code] #include<stdio.h> #include<stdlib.h> int main() { struct { char origin[50]; char destination[50]; char flight[10]; char aircraft[3]; char days_of[7]; char departure[4]; char arrival[4]; char begin_date[10]; char end_date[10]; }flight_details[1679]; FILE *fp; fp=fopen("iaschedule-07(edit).csv","r"); char buf[50]; int i; while( fgets(buf,sizeof(buf),fp) != NULL) { strcpy(flight_details[i].origin, strtok(NULL,",")); strcpy(flight_details[i].destination, strtok(NULL,",")); strcpy(flight_details[i].flight, strtok(NULL,",")); strcpy(flight_details[i].aircraft, strtok(NULL,",")); strcpy(flight_details[i].days_of, strtok(NULL,",")); strcpy(flight_details[i].departure, …

Member Avatar for richie2021
0
127
Member Avatar for sweetleaf

well can any one help me with the internal representation of float and doubles ......i know tht they are stored using the IEEE 754 format so is that the reason why a double 0.7 is greater than a float 0.7 ?????

Member Avatar for sweetleaf
0
93
Member Avatar for lotsofsloths

Ok so here is my code for a practice homework at LiduidEmberS [CODE] #include <iostream> using namespace std; int main(void) { int a; int b; int c; int d; int radius; int volumeprism; volumeprism = b*c*d; int volumesphere = 1.3333333333333*3.1415926536*(radius^3); cout << "Welcome to the program!\n\n"; cout << "Do you …

Member Avatar for ndeniche
0
156
Member Avatar for nalinibh

Dear All, Many thanks for the answer of my first question though i had the answer for this from one who has already put this question forward.I have modified it and it has worked.Thanks!! Now i want to optimize my coding by adding another condition so that it doesn't perform …

Member Avatar for nalinibh
0
112
Member Avatar for jlb_2_99

I am trying to write a code that asks for the user first and last name and concatenate the function displaying the user's lastname and then firstname example: bob allen // first and then last name allen, bob // last and then first name using the concatenate function: This is …

Member Avatar for John A
0
129
Member Avatar for Elfshadow

Is this the right way to use fgets when its for non file input. [code=C] #include<stdio.h> int main() { char userinput[256]; printf("Enter a string:"); fgets(userinput,256,stdin); printf("%s",userinput); return 0; } [/code]

Member Avatar for WaltP
0
112
Member Avatar for Micko

Hello guys, It's been a while since I last time posted in this forum. I have strange problem regarding matrix allocation. I was asked to write code that includes 2D array dynamic allocation. I write two version of matrix allocation. Here is in my opinio relevant part of the code: …

Member Avatar for Micko
0
155
Member Avatar for mnmustafa

Hiz well i m new in here n i m goin to have exam after 3 days :S i got stuckd in a question Q) Write a program to print the product of even numbers..... plz i m new with c langauge :S n i m having final exam jst …

Member Avatar for sweetleaf
0
134
Member Avatar for nedwards

I was wondering by using the Visual Studios 2005 and Windows XP could you write code in C# and add some other code in C++? What is happening is that I am updating this program that was previously made in C# and I need to add some security functionality, although …

Member Avatar for nedwards
0
140
Member Avatar for castegna

I need to do a non-recursive function for count the leafs in a tree. I have the recursive algorithm, Can someone help me to figure this out!! count leafs int count_Lnodes(root, int cnt) { if (root != NULL) { cnt = count_Lnodes(root->left, cnt); cnt = count_Lnodes(root->right, cnt); if (root->left == …

Member Avatar for Narue
0
127
Member Avatar for Jishnu

Hi every=one, This is in continuation to my last post. Eve after initialising the 2d pointer a, as suggested, the same probllem as described earlier persists. Plz help -Jishnu. Hello, The code below calculates the determinant of the matrix. I know that the method of global 2-d pointers is a …

Member Avatar for Ancient Dragon
0
95
Member Avatar for aznstyles408

I wrote this function to generate random numbers and return it to the calling function [code=c] int getCard(void) { int range; int card; srand(time(NULL)); range = (10 - 1) + 1; card = rand() % range + 1; return card; } the calling function is.... int first2(void) { int firstCard; …

Member Avatar for Aia
0
168
Member Avatar for EnderX

I've been attempting to teach myself some C, as I have been tasked with maintaining a program written for a handheld barcode scanner that appears to be written in this language. (At least, I'm assuming that for the moment, considering the fact one of the first statements I saw when …

Member Avatar for Aia
0
156
Member Avatar for Jishnu

Hello, The code below calculates the determinant of the matrix. I know that the method of global 2-d pointers is a poor programming practice (so u don't need to reply saying that!!!), but it is a simple method for an amateur programmer. As the code didn't work, I set two …

Member Avatar for Salem
0
72
Member Avatar for pretu

Hi All How can we plot the pixel without using the function putpixel(int x,int y,int color) .

Member Avatar for Salem
0
363
Member Avatar for Siva_sbj

I am using Bloodshed C++ for my development. I have compiled the Dos console program in C and its working fine. But i want to add a icon to it instead of the windows application icon. Hope someone could help me.

Member Avatar for Ancient Dragon
0
75
Member Avatar for cinger

hi everyone, i am working on Turbo C 3. here the near pointer is of 16 bits and the far pointers are of 32 bits. i want to know how these logical addresses of 16 and 32 bits are converted into physical address of 20 bits. thanks.

Member Avatar for Ancient Dragon
0
46
Member Avatar for dotcom123

Hello everyone! I am doing Digital Compass Navigation Aids. It consists of the 1490 Digital Compass, a P18F4620 Microcontroller, ISD2560 voice record/playback chip LM4808M amplifier, 5volts and 3.3volts voltage regulators and three switches, the recording switch, the playback switch. First, i should record north, south, east and west into the …

Member Avatar for dotcom123
0
124
Member Avatar for alpha_gamma

Hi all, I am working on a C++ program that converts a decimal to a fraction, finds the lowest common multiple, multiplies the numerator by the denominator, then reduces the fraction again so the fraction will be 'numerator/1'. I am using this code in a larger program to change a …

Member Avatar for iamthwee
0
484
Member Avatar for jlb_2_99

When using loop functions or statements which loop statement do you prefer to use that would be easy for a beginner like me to use: The do while loop, for loop, or while loop. I ask because I am to re-write my code from using the If statement to using …

Member Avatar for jim mcnamara
0
150
Member Avatar for stindeee

For home work i have to do SMS in c++ ,which has to be exactly like on mobile.I dont know how to do this.

Member Avatar for WolfPack
0
90
Member Avatar for Confused612

can any body help me out wid this ........as i m doing C not C++.....plz tell me the whole program........plzzzzzzzzz Construct a solution algorithm and write a C program for the following programming problem. Use a top-down modular design. State clearly tasks that are to be performed by each module. …

Member Avatar for Aia
0
3K
Member Avatar for adr1

hi , How are you? I am using a software for my business.I want a tsr program which can help me stop using of some buttons from the keyboard.Like cntrl+delete combination key, f6 function key and some others. And in the same way i want a program to deactivate the …

Member Avatar for jbennet
0
125
Member Avatar for srinath.sec

hi, what is the difference between [COLOR=red]static[/COLOR] and [COLOR=red]shared[/COLOR] library how do we create them and what is the extension used for both of

Member Avatar for dwks
0
96
Member Avatar for lilmiss

Create a class called [B]DateProfile[/B] that has the following private instance members: [LIST] [*][B]gender[/B] - a [B]char[/B], the gender of the applicant.('M' or 'F'). [*][B]search_gender[/B] - a [B]char[/B], the gender ('M' or 'F') of desired partner (this is not the gender of the applicant, but of the applicant's requested partner. …

Member Avatar for jwenting
0
141
Member Avatar for Aia

I posted a snippet of code in the c programming forum and like always I used the [code=C] tagging form, however the code did not show properly. Here's a snap-shot of that particular occasion.

Member Avatar for joshSCH
0
140
Member Avatar for sushanttambare

Hi all, Please can u tell me what are the method involved in algorithm transforms? since I am working on DSP algorithms and i want to reduce the complexity which are written in c language so please help me to understand what exactly is the algorithm transform means? please give …

Member Avatar for sushanttambare
0
82
Member Avatar for ShawnMuller

Hi, I have a problem that happens very rarely. I have a calculation which ads (for example) -15000.00 to 15575.51 and saves the results to an oracle database. However, the reslut in the databse is 575.51000002 Both figures are loaded elsewhere from the database and either have 0 or 2 …

Member Avatar for ShawnMuller
0
99
Member Avatar for bRutal!

Hi, I have a question 'bout c++ beep...It's very simple...Where can I find Music Scales for C++ ? I've searched google up'n'down without succes...thanks for any help :?:

Member Avatar for bRutal!
0
168
Member Avatar for Sturm

Hello, I am doing a homework assignment and need a bit of help. I have to overload the prefix ++, postfix ++ operator, and the = operator for a circle class. Heres the code I have so far: [code] #include<iostream> using namespace std; class Circle { public: Circle(); Circle(int n); …

Member Avatar for Sturm
0
213
Member Avatar for BaluTheWiz
Member Avatar for BaluTheWiz
0
144
Member Avatar for jlb_2_99

[B]My code seems to stop working after first prompt for please insert money can anyone tell me where in my code am I lacking.[/B] [code=c] #include <stdio.h> int main() { char drinkchoice; float insert; float money; float totalinsert; printf("How much do you wish to insert: "); scanf("%f", &insert); if(insert < …

Member Avatar for ~s.o.s~
0
95
Member Avatar for rapperhuj

after compiling wxgtk.. and this format: g++ sample.cpp `wx-config --libs --cxxflags` -o sample it can compile but if you run this the error is:: ./sample: error while loading shared libraries: libwx_gtk2_aui-2.8.so.0: cannot open shared object file: No such file or directory but all its lib.. where installed i dont know …

Member Avatar for richsewell
0
78
Member Avatar for openuser

I came across a simple way of quicksorting linked list which is same as iterative version of quicksort for arrays... [url]http://www.openasthra.com/c-tidbits/sorting-a-linked-list-with-quicksort-simple-algorithm/[/url] worth a look... Let me know if you have any other simple algorithm for QuickSort (for sorting linked lists), should be easy to understand... Thanks.

Member Avatar for Ancient Dragon
0
840
Member Avatar for complete

I never really got this back in school when I learned C programming and the instructor did a bad job explaining it. What is a union in C really and how do you use it?

Member Avatar for Ancient Dragon
0
106
Member Avatar for Ahmed Padela

Please help me to Write a program "to print the sum of the main and sub diagonal elements" Thanks all.

Member Avatar for Ahmed Padela
0
215
Member Avatar for vicky_dev

Hi... I have a static library, libxbgi.a. When I want to properly link a program with this library I have to write: [INLINECODE]gcc prog.c -o prog -lm -L /usr/X11R6/lib -lX11 -L. -lxbgi[/INLINECODE] It is cumbersome to write such a long command line. Is it possible to pre-link the libX11.a and …

Member Avatar for Narue
0
111
Member Avatar for radskate360

Hi all I had made a post a bit ago and had a few responces, they all really helped and I got past that part so wanted to just finish up and needed a bit more assistance so far I have everything i need outputing to the window with cout<< …

Member Avatar for Ancient Dragon
0
101
Member Avatar for radskate360

IF anyone can give me a little more assistance I would be very greatful. I am working on this program for my C++ class and here is how it goes. Directions. Write a program that calculates and prints the monthly paycheck for an employee. The net pay is calculated after …

Member Avatar for Narue
-1
671
Member Avatar for m.s

Hi there, I'm a first time poster and first year C programming student. I am a little stuck on the following question: ----------------------------------------------------------------------------- "Conway's life is a special kind of game. It isn't really a game - just a spectator sport. It is played on a chess board, where each …

Member Avatar for m.s
0
199
Member Avatar for srinath.sec

hi, what is the difference between a library function and a system call

Member Avatar for Ancient Dragon
0
102
Member Avatar for Savage221

One of the questions for my study guide asks to write a function that prompts the user to enter 3 integers, then "return" the integers via it's parameters through call by reference. Does this just imply using pointers as arguments, then when the values are changed in the function they …

Member Avatar for Savage221
0
84
Member Avatar for sofianos

Hi! i am creating a struct and i want to save it in a FILE (example FILE *fptr). it creates a file anw and it will fill some elements in the struct. Below is what i hv done so far. Btw sorry for my bad english. The reason for my …

Member Avatar for Aia
0
135

The End.