15,552 Topics
| |
hi all.. can anyone give me the algorithm for simple and deficit round robin.. pls.... :-| i'm doing a research on transferring video over bluetooth.. | |
Hi I have a struct [code] struct s_list { char name[30]; char lowest[30]; int int_value; }LIST[100]; [/code] I want to pass the int_value to a the unix function qsort, but how do i pass structs to a function/procedure? regards | |
Hi I'm trying to create and use some basic socket. I made a code but the compiler reports an error. I'm using linux ( sys/socket.h library) The code is> [CODE] #include <iostream> #include <cstdlib> #include <sys/socket.h> #include <sys/types.h> #include <unistd.h> #include <arpa/inet.h> #include <signal.h> #include <netinet/in.h> #include <netdb.h> #include <stdio.h> … | |
Hello Im trying to segment a big file (200mb) into smaller packets so i can transmit over TCP/IP but im clueless how to do it. Can anyone help me please. Using the borland builder Thanks | |
One of the things I can't get working is reading and writing a structure to and from a file in binary. I'm sure that I'm using fread and fwrite correctly. However, I keep getting crashes which I cannot find ways to debug. [CODE]#include <stdio.h> #define MAX 1 typedef struct { … | |
I'm in the middle of a project using a mysql database and spanning several languages. A problem has arisen that we need a piece of it to be in C, that reads in a query, replaces some placeholders (wrapped in '?' chars), and then runs said query. The problem here … | |
Why cant we have a virtual constructor? All the materials give somewhat similar anwer to this question. "First the VPTR Pointer is initialised to it's proper VTABLE by the contructor which is automatically done by the compiler ,,,," or "You don’t ever want to be able to make a call … | |
Hi. I can't a small part of this program to work correctly; the square root function either returns a bunch of funny symbols OR it returns 0.00 On a side note, I have 2 questions: 1) If you have a structure nesting two other data structure types (like in my … | |
[CODE]#include<stdio.h> #include<conio.h> #include<math.h> main() { float a,b,c,d,k,x,y; clrscr(); printf("Enetr the values of a,b,c=>"); scanf("%f %f %f",&a,&b,&c); d=((b*b)-(4*a*c)); k=sqrt(d); x= (-b+k)/(2*a); y= (-b-k)/(2*a); printf("The quadratic equation is x=%f and y=%f",x,y); getch(); } [/CODE] but after compiling the result is look like this .....why .... wnter the values of a,b,c=>6 5 4 … | |
Hello i have a a struct which contains the below 1 10 11 2 3 But i need this to be in numeric order, ie 1 2 3 10 11 below is my code [code] do { fprintf(fReport, "List Name = %d\n", LIST[t].name ); t++; } while( t != k … | |
[code] #include <stdio.h> int arrange(int[],int); main() { int array[10],num,i,flag; clrscr(); puts("Enter length of array"); scanf("%d",&num); puts("Enter the enties:"); for( i=0; i<=num-1; i++) { printf("\n(%d).......",i+1); scanf("%d",&array[i]); } do { flag=arrange(array,num); }while( flag==-1); printf("\nThe array in desending order is: "); for(i=0; i<=num-1; i++) printf("\n\t\t***** %3d *****",array[i]); getch(); } int arrange(int *block,int num) … | |
:mrgreen: Hi to all, I have a challange in my work, we have a project that uses a variable of type "CMapStringToPtr", this object is use to store some data, now we want to change the type to more efective type, the problem is that we need to know if … | |
Hi to all, I need your help, I need to sort a CList, I was wandering if you can help me in this issue. Wich is the best way to sort CList and How to manage the pointer? Thanks :rolleyes: | |
I was wondering if someone can show me how to do a fade in and fade out text effect using c.i tried couple of techniques using delay function and changing up the text color but doest come up right:sad: | |
Hey, I need help with finding out if BSTs are height and size balanced, Ive got plenty of books and people telling me different things but i need it to click in my own head! Any ideas or simple ways of doing it? Thankyas! | |
hi everyone,:cool: I like to work on accessing internet(that means get a web site content) with my c code. so plz tell me a possible way to send reqest to a perticular web site and get the information....:rolleyes: | |
hi guys, first time posting here :cheesy: i have problems with my assignment.. Here is a piece of code inside my main function, I have to convert decimal number to binary. I take decimal numbers divide by 2, and strcat() the remaining, then use a function strrev() to reverse it … | |
hello I have a program which is being passed 2 lines items at a time To hold these lines i have 2 static pointers, these are:- static char *first_string=NULL; static char *second_string=NULL; These 2 lines will contain data such as:- A1|VALETING|LIMITED A2|COMPANY|VALET|LTD I then use strtok to move through each … | |
| |
I'm either missing something small or theres a BIG problem somewhere. The following code compiles sucessfully with [B]g++ 4.1.0[/B] under [B]SuSE 10.1 i586 [/B][I](Linux 2.6.16.13-4-default i686) [/I]but it gives a Segmentation Fault when I run it. [code] #include <stdio.h> #include <list> typedef struct { std::list<int> b; } data; int main(int … | |
[code]#include <stdio.h> #define a b #define b a int main(void) { int a = 20, b = 30; printf("%d %d", a, b); } [/code] What will be the output of this programm ?????????????? Really confused with this ... Can somebody tell me what exactly will be happen and how macros … | |
[code]#include<stdio.h> #include<string.h> #define size 21 #define max 5 int id[max][size]; char ln[max]; int pr[max]; int mt[max]; int fg[max]; void getrecord() { int i; for(i=0;i<=4;i++) { clrscr(); printf("id number:"); scanf("%d",id[i]); printf("last name:"); scanf("%s",ln[i]); printf("prelim:"); scanf("%d",pr[i]); printf("midterm:"); scanf("%d",mt[i]); fg[i]=(pr[i]*0.4)+(mt[i]*0.6); } getch(); } void displayreverse() { int i,p; clrscr(); printf(" idno. lstnme prelim … | |
Ask Function problem?thanks <<<<<<<<<<Class.h>>>>>>>>>> [code] #pragma once class Class { public: int get_return(int a,int b,int (*compare)()); int Rxgmoral(int a,int b); void Fun(); };[/code] <<<<<<<<<Class.Cpp>>>>>>>> [code] #include "Stdafx.h" #include "Class.h" int Class::get_return(int a,int b,int(* compare)()) { return (compare(a,b)); } int Class::Rxgmoral(int a, int b) { return a+b; } void Class::Fun() { … | |
[COLOR=black]This is the program. Re-using the tuition calculations from Lab1, and write a program to do the following:[/COLOR] [COLOR=black]Read student classifications and numbers of units from the [/COLOR][B][COLOR=black]data file [/COLOR][/B][COLOR=black]LAB2IN.TXT. (No error[/COLOR] [COLOR=black]checking of data read from input file is required.) Then write each student's resulting tuition to a[/COLOR] [COLOR=black]second … | |
I want bundle a exe file to a software.can anyone suggest some place to find some softwares? | |
is it possible to change the space into underline? coz i don't know how to program that in C... please help!! | |
int i=0,j=1; cout<<(j++)&&(i++); //output=1; i=0,j=1; printf("%d",(j++)&&(i++)); //output=0 can anyone please tell why this difference in output ??? | |
I have to write a function which takes an integer array as input and it should return true if the array contains 1,2,3 or 4. Conditions 1) The function should pass thru array only once. 2) Can use two local variable. 3) Preferably using bit manipulation. Now suppose if the … | |
Two questions: 1. What function will output N bytes of data? The data may contain and may end with numeric zero. 2. What function will cause the process to suspend for N milliseconds? An explanation for question 1. [code] struct modbus_structure { char device_address; char function_code; UINT function_address; UINT address; … |
The End.