18,490 Topics
i ve got this #include <stdio.h> #include <math.h> void main() { int angle_degree; double angle_radian, pi, value; printf ("\nCompute a table of the sine function\n\n"); pi = 4.0*atan(1.0); printf ( " Value of PI = %f \n\n", pi ); printf ( " angle Sine \n" ); angle_degree=0; while ( angle_degree …
Does anyone know a console program runnable from DOS that prompts user to input length/width of rectangle then prints rectangles area/perimeter ?
Hi everyone, Can You please help me with the [B]Round-Robin scheduler [/B] [B]algorithm (C language)[/B] My program will use as a Datastructure a doubly linked list to hold processes( I will represent my process as: Id(char*), Priority(int) ( a process with priority n will have n CPU time slots) and …
Can anybody tell me if it's possible to write a program in VB that can read and edit the Master File Table of an NTFS system to restore a deleted file.... i know that it can be done in C And C++ but not sure about VB.....
Im a student at YSU in Youngstown, Ohio and I'm taking a computer programming and problem solving class. I'm lost completely and I have this assignment that was given to me that I have no clue at all what to do. My question to you is could you please help …
#include "stdafx.h" #include <stdio.h> #include<stdlib.h> #include<iostream> typedef struct Sale { int clientNumber[4]; char Item[45]; char PartNum[12]; int UniCost[11]; char DayOfMonth[20]; }; Sale rSale[197]; typedef struct Data { int clientNumber[4]; char Company[34]; char ABN[14]; char StreetName[36]; char Suburb[24]; char State[11]; char PostCode[5]; char Phone[15]; }; Data rData[10]; int _tmain(int argc, _TCHAR* …
Hi folks. I'm new to the board and I sincerely apologize if this has been posted time and again. I did search but couldn't find an answer. I am starting to program for the Symbian OS (never done it before) and have Visual Studio 2005 at my disposal. I've read …
hi i have a function that opens a file and store the data into a matrix [CODE]void openfile(vector<vector<string> >& data, string path) { ifstream inFile; inFile.open(path); ....[/CODE] this does not work but it works when i eliminate the path as input [CODE]void openfile(vector<vector<string> >& data) { ifstream inFile; inFile.open("C:\file.csv"); ....[/CODE] …
about ComboBox problem <<<<<<<Dialog.h>>>>>>>> public: CComboBox Cbx; struct Data { LPCTSTR lpszName; LPCTSTR lpszValue; int ID; }; <<<<<<<Dialog.Cpp>>>>>>> Data d; d.lpszName=_T("Name"); d.lpszValue=_T("Value"); d.ID=1; Cbx.InsertString(0,d.lpszName); Cbx.SetItemDataPtr(0,(void *)d); how to struct data append to ComboBox Control,thank:)
Can I know something about Sequential Search?? Answers within 24 Hours PlZ..
Please provide me some sample programs that illustrates sorting techniques and about Sequential Search also..
I have a homework assignment to write a program about mileage. I've been able to get it to work, well except the average doesn't calculate correctly and I haven't been able to verifiy the users input. I'm using Visual C as my compiler. Can someone help me with checking the …
Hi I'm Loren, live near Bath, UK. Just started a degree so toying with ideas for my first programming project in C :eek: so hoping to learn lots from this site. Please feel free to bombard me with any thoughts or opinions.:cheesy:
When I compiled the follwing code snippet, it compiled without any error. My question is if it is allowed to declare [I]char[/I] fields inside a structure, then how can I store character string in that variable(we can not use functoins like strcpy:-| ). OR Is it not allowed to declare …
I get the following error on the first line of my array... " syntax error before `}' token " My eyes are about to fall out of my skull. Can someone take a look for me, everything seems to be fine, but maybe I'm blind. Here is the code in …
The knapsack problem I try to write about this problem but i can't ... This is a problem thai i have .. Suppose you want your knapsack to weigh exactly 20 pounds, and you have only five item, with weight 11,8,7,6,5 pounds. For small number of items, humans are preety …
[B]i want to find out small projects to work upon so as to improve my grip over c, can someone tell me some sites having projects in c:confused: [/B]
hello i want a programming concept in c in which it should take a query of sql and regarding table and then give the output as a resulting instance corresponding to query
I am completing my degree in Multimedia and Software Developement. The two languages that are being focused on are VB.net and Java. When I finish my degree, I will have not had a class in C++. Is C++ not used very much any more? I was just kind of curious.
#include <stdio.h> #include <string.h> char* string(char *str); int main() { printf("%s\n ",string(" in this method ")); getchar(); return 0; } char *string(char *str4) { char str[25] = "How"; char str2[25] = " do I "; char str3[25] = " return a string"; strcat(str,str2); //append str2 to str and return str …
I made a Cpp application wihich links with shared objects. But when I runs the application, it crashes surprisingly before entering into the main() control block. After trying with gdb I came to know it is crashing while reading symbols from a library. GDB says something like Reading symbols from …
look at "dc.SelectObject(&pen)" and "dc.SelectObject (&brush)",here no matter I use "&" or not it results the same. why is that? [code] void CMainWindow::OnPaint () { CPaintDC dc (this); CBrush brush (RGB (255, 0, 0)); CPen pen (PS_NULL, 0, (RGB (0, 0, 0))); dc.SelectObject(&pen); dc.SelectObject (&brush); dc.Ellipse (0, 0, 200, 100); …
the following code is from the examples on the book CPen pen (PS_SOLID, 0, RGB (192, 192, 192)); CPen* pOldPen = dc.SelectObject (&pen); //do some drawing staff here dc.SelectObject (pOldPen); I know once I create a pen, I can do some drawing staff, but why should I add "CPen* pOldPen …
I am working on a program that uses interrupts and a buffer to read/write characters from/to the console screen. (This is a tty.c program with ttywrite(), ttyread(), ect...) I also have a given queue folder, which contains queue.c that has the methods: [code] int init_queue(Queue *q, int max_chars); make a …
hi can anyone tell me please what is segmented error , i have made a program in c on linux and when i am running it after compiling , after a few inputs it shows segmwntwd erroe. what is this??:?:
[COLOR=#000000][/COLOR] [COLOR=#000000][/COLOR] [COLOR=#000000][/COLOR] [COLOR=#000000][/COLOR] [COLOR=#000000][/COLOR] [COLOR=#000000][int count(Node * list)[COLOR=windowtext][/COLOR][/COLOR] [COLOR=#000000]{ [/COLOR] [COLOR=#000000]if (list == Null) [/COLOR] [COLOR=#000000]return 0; [/COLOR] [COLOR=#000000]else [/COLOR] [COLOR=#000000]return 1 + count(list->next); [/COLOR] [COLOR=#000000]} [/COLOR] [COLOR=#000000]Write a recurrence relation for the function count.][COLOR=windowtext][/COLOR][/COLOR]
[COLOR=#000000][/COLOR] [COLOR=#000000][/COLOR] [COLOR=#000000][/COLOR] [COLOR=#000000][function exp(k, n) [/COLOR] [COLOR=#000000]{ [/COLOR] [COLOR=#000000]power := 1; [/COLOR] [COLOR=#000000]for i := 1 to n do [/COLOR] [COLOR=#000000]power := power * k; [/COLOR] [COLOR=#000000]return(power) [/COLOR] [COLOR=black]}] [/COLOR]
Can anyone help me in implementing a program which contains a routine which is similar to getpid() in functionality, but there should not be use of getpid() in the program. Please reply as soon as possible.
Hi, I have a basic doubt about C compiler option. I have 10 functions in my environment and I want a particular function to go into a new section which will be defined in a file where the function is defined. My question is: Can we define a seperate section …
Can anyone guide me as to how to implement a routine(in C) similar to getpid() in C.
Hi, I am trying to convert a string length to a char and store it in an array. For some reason, even though its not giving me any error, when I try to print the array out, the place where I store the strlen is blank. Here's my code: [code] …
Hi, I have a question which i have no idea how to do manage. I need to convert a string in the format like "1 234 567" so i can do some calculations on the indvidual numbers. What is the best way to do this? Thanks
Hi Guys, I know this will be easy for anyone here and it might take 2 minutes to right the code. I wonder if someone can help me to right a loop using strtok() to be able to extract the words form a string like "various systems analyze the model …
does anyone review the code shippets that get posted? I was glancing through the list and found one that is full of bugs :eek: -- any newbe would have a difficult time trying to figure out how to correct the bugs. Not a problem for me, but just wondering if …
I have to use a variable of type double to store and manipulate a value for an amount of years. This means I have to ensure that the data input by the user is an integer. The program will accept a non-integer value, but I want it to continue reprompting …
I am using filepointer in C. when I compile the code and run it for the first time the filepointer works fine and logs are written into log files. But during next hits there is an inconsistency in logs getting written. sometimes getting written and someother times not written. But …
Hello, I am trying to develop something that, when you press a character on the keyboard, puts a char into a char-type variable. Should be easy right? Well, I don't want to require the user to have to press ENTER when they press the key. Maybe scanf isn't the right …
hi, in my code i am creating a tree, which have a 20 levels and and each level we have 10 nodes. i.e every node can have a 10 children. for them i am allocating memory for each node. each node is stracuture which occupies the memmory around 40 bytes. …
Is it possible to somehow reprogram a Coke/Water/Pepsi w/e machine to dispense drinks at a lower cost or just plain out give them to you? Just by like pushing some selections on the panel?? I saw it on the news someone did it so an ATM machine gave out double …
Hi guys i m new for Symbian series 60, I want to know the how to write the code to listen to a particular folder, so that if any changes happens to that folder then the application should popup a message box.
this is a program that i have to write. followed by the code i already written. Design Specification You are to write a program called âStockAnalyserâ. Your program will read a text file that contains historical price of a stock. The program will allow users to query the stock price …
Hi guys i m new for Symbian series 60, I want to know the how to write the code to listen to a particular folder, so that if any changes happens to that folder then the application should popup a message box.
I have a doubt on function returning a value. Consider the following program snippet. [code] int add(int a,int b) { int c=a+b; return; } int main() { int a=10,b=20; printf("%d %d %d",a,b,add(a,b)); return(0); } [/code] The above program gives the output as 10 20 30 But the function is not …
Hi Guys, Just wondering I'm newbie writing C programs and I don't expect to get the entire code here but I was allocated a task/assigment to create a C program that emulates a search engine so I was given a bunch of text files that contains HTML data and I …
I m Nagarjuna doing my engg in comp sci. I m preparing for GATE -2007 to pursue Mtech in any of the IITÅ¡. Does any of u ve the materials for GATE
I want to create my own cursor image by importing an exsiting .ico file, but every time the VS6.0 automatically imported it into resources as ICON file, even I name it as IDC_CURSOR1, I can not use " wndclass.hCursor = LoadCursor (hInstance, MAKEINTRESOURCE (IDC_CURSOR1)) ;" to create my own cursor
:?: haiii iam a student from engg college... i juz have a lab on compilers.. i have a program called conversion of Regular expression to NDFA.. can u plz help me with de source program... in C:?: :?: :idea:
Hello everyone. I was trying to compile a Linux kernel module yesterday called vmmon (which you need to make VMware work on Linux) for the 2.6.16.7 kernel. First I installed a GCC package made for my distro, Puppy Linux 2.00. The package turned out to be for a slightly different …
Im wanting to create a simple command line prog, and i want it to randomly change the desktop background by simple commands using the registry but i cant find out anyware on how to change desktop bg with registry. does anyone know?:twisted:
Hi, Could any one please let me know if we can connect to database using C, and if yes let me know the functions in C used to send the SQL statements in the buffer to SQL server.
The End.