15,552 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 … | |
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 … | |
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 … | |
[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 | |
#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 … | |
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??:?: | |
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 … | |
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 … | |
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. |
The End.