19,876 Topics
![]() | |
Hi I would like to know if there is any certification in C available....like Sun certification for Java?? | |
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 … | |
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 … | |
[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 … ![]() | |
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 | |
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 … | |
[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, … | |
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 ????? | |
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 … | |
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 … | |
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 … | |
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] | |
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: … | |
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 … | |
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 … | |
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 == … | |
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 … | |
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; … | |
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 … | |
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 … | |
Hi All How can we plot the pixel without using the function putpixel(int x,int y,int color) . | |
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. | |
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. | |
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 … | |
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 … ![]() | |
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 … | |
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. | |
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. … | |
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 … | |
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 | |
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. … | |
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. | |
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 … | |
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 … | |
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); … | |
| |
[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 < … | |
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 … | |
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. | |
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? | |
Please help me to Write a program "to print the sum of the main and sub diagonal elements" Thanks all. | |
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 … | |
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<< … | |
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 … | |
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 … | |
hi, what is the difference between a library function and a system call | |
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 … | |
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 … |
The End.