18,490 Topics
can you please help me or give some advice of how will i make this problem: Student database: the user will be asked to input information about students(1-20 students) and the inputs are age,year level,name,course.... the program also will be able to sort the informations ethier by descending or ascending …
:?:The statement *s1++=*s2++ actually leads to the assignment of value at s2 to s1 followed by incrementation of s2 then the incrementation of s1.
About CView problem,thank:) <<<<<<<<<Preview.H>>>>>>> class Preview : public CView { public: virtual void OnDraw(CDC* pDC); virtual BOOL OnPreparePrinting(CPrintInfo *pInfo); void OnPrint(CDC *pDC, CPrintInfo* pInfo); }; <<<<<<Preview.CPP>>>>>>>>> void Preview::OnDraw(CDC* /*pDC*/) { } BOOL Preview::OnPreparePrinting(CPrintInfo* pInfo) { return DoPreparePrinting(pInfo); } void Preview::OnPrint(CDC *pDC, CPrintInfo* pInfo) { CString str=_T("rrr"); pDC->TextOut(0,30,str); } <<<<<<<<<<<Dialog.Cpp>>>>>>>> Preview …
Please can somebody help me with Question Papers and answer Papers on [B]C, C++ and java. [/B]I have an Interview.
[B]Introduction[/B] hey all, I'm matt. I'm new to this forum and C. I hope to stick around and eventually be able to ANSWER questions instead of sit around being new to this. but for now, new to this is what I am. [B]My Background[/B] I've been learning from Dave Mark's …
hey guys.. i need this urgently.. please help me in this. i need a code for detecting usb devices. a complete code, wanna make a project on this!
Hi, I have to write a Dump Tool for a file on UNIX. I have never written a dump tool before. Can anyone please guide me how to proceed?? jazz
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:
Good Morning All, I am planning on undertaking a project for school and was wondering if anyone could tell me if I am better off using Assembly Language, Java, Basic or C to program my OOpic Microcontroller? Thanks. Ini
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!
I am new here and code is what i want to learn. Have been thinking about c and c++ as well as xhtml. Was ill for some time and if i want to go back to work then it needs to be something IT related. I am really happy to …
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; …
Hi all. I am new to C, at least to the concept of pointers. I am trying to write a process scheduling simulator for my operating systems class (at the last minute of course). Anyway, I wrote a program just using arrays and got it to compile but then of …
I have opened COM1 for I/O and need to input data. How do I check for data without being stuck if there if the port has not received any data? The compiler is lcc-win32 running under Windows XP. Thanks, bkelly
Can u anybody of u explain me how the following statement works?? y=x++<=5;:!:
[B]Create a flowchart that inputs an amount and output the denomination breakdown by 100,50,20,10,5,1. e.g. Amount: 237 Output: there are 2 100 peso there are 0 50 peso there are 1 20 peso there are 1 10 peso there are 1 5 peso there are 2 2 peso Hope you …
Hi, I have been using the windows API for some time now and feel quite comfortable with it. I know for larger projects MFC is a better choice over the raw API. I've been google searching for some good tutorials on MFC but haven't really found any good ones like …
Hi all, I'm a newbie in C..Right now, I have to write a code to read a text file and then insert all the info inside that text file into database. Should anyone have a simple sample of it, maybe you can share with me in order for me to …
[code]#include<stdio.h> #include<stdlib.h> #define MAX 30 int menu(){ int choice; printf("1. Add a new reservation\n"); printf("2. Show details of a reservation (given reservation number)\n"); printf("3. Make Payment (given the reservation number and payment amount)\n"); printf("4. Confirm a Reservation (given the reservation number)\n"); printf("5. Quit\n"); printf("Enter your choice: "); scanf("%d", &choice); return(choice); …
Ask a problem,About CEdit control i write code..... <<<<<<<<<Static Dll>>>>>>>> ****************CmEdit.h********** [code] class AFX_NOVTABLE CmEdit : public CEdit { public: __declspec(dllexport) CString CmGetDlgItem(int nID); };[/code] ***************CmEdit.Cpp********** [code] CString CmEdit::CmGetDlgItem(int nID) { CString Str; GetDlgItem(nID)->GetWindowTextW(Str); return Str; }[/code] <<<<<<<<<<<<Static Exe>>>>>>>>>>>>> [code] #pragma comment(lib,"Dll.lib") #include "CmEdit.h" void SocialSecurityData::OnBnClickedOk() { CmEdit d; CString …
[code]#include<stdio.h> #define size 21 #define max 10 typedef struct id { int idnum,q1,q2,q3; char fn[size]; char ln[size]; char mi[2]; float ave; }id; id l[max]; id a; int menu() { int i,s=0; while(s<1 || s>4) { clrscr(); gotoxy(5,5); printf("MENU"); gotoxy(5,7); printf("1. insert"); gotoxy(5,9); printf("2. delete"); gotoxy(5,11); printf("3. display"); gotoxy(5,13); printf("4. exit"); …
This program is supposed to make two passes through a file; the first pass counts the number of elements inside the file to get the total size; the second pass will fill the array and sort it. The problem i'm having is that on the second pass, the array is …
The End.