15,551 Topics
| |
what is the target of pointer to function? when do i use pointer to function? :?: | |
Need help in finishing this problem. I was doign ok at first but somehow ran into 2 compile errors. Now I'm tired and going in circles. I need a fresh pair of eyes to look it over. This is my first time doing arrays. [code]#include <iostream> #include <string> #include <iomanip> … | |
ive made a dll in c, and it gets called with visual basic. in vb one of the parameters i pass is the address of a vb function. i can get the dll to run the function fine, but i need to put that address into a struct to pass … | |
For research, the admissions office wants to compare how well female and male students perform in certain courses. You are asked to write a program that prompts the user to enter a number of student records consisting of (a) student’s sex (‘f’ for female, ‘m’ for male) and (b) GPA … | |
Can anyone point me in the direction of a site that has a good tutorial on using Tab Controls on a MFC program? | |
I would like to change the font in a static text box. But I want it to be that size until I change it again. I put the following code in the OnInitDialog() function: [code] CWnd* pWndControl = GetDlgItem(IDC_PROGRESS_INDICATOR); pWndControl->MoveWindow(((MyRect.right - MyRect.left)/2) - 100/2, MyRect.top + 100/2, 100, 100, TRUE); … | |
| |
[I]This post has been edited by your friendly neighborhood forum nazis[/I] [url=http://www.daniweb.com/techtalkforums/announcement8-2.html]We don't do homework![/url] [url=http://www.catb.org/~esr/faqs/smart-questions.html#homework]We're not stupid![/url] There are two things you lack: honesty and integrity. As these are desirable traits for a student, I suggest you forget about programming and pursue a career in politics. Chances are good … | |
Hi everyone, I am having this problem to define a function which raises a float y eg 3.5 which is not a whole number to the base x. Heres the code which gives domain error as function pow takes only int values. [code]//Program to raise a number to power when … | |
What is the best way to save to a file using a MFC Dialog based program? I need it to output mutipule data type (CString, int) to a file. I also need it to read the data from the file to update the controls (i.e. an options dialog). I've tried … | |
i am doing a program that solves a math exercises with order of arithmetic operations for example: 2*(7-6*4+(11-6)+(14-5)) now, the user types number or character(*,-,+,/) i have a struct that contains one int variable and one char variable the user types character or number and i need to put the … | |
hai friends Can u please gv me some refernce to sites which will be helpful for me to write program for sending packets cointinously to ethernet card.My prorama should accept the data. Waiting for ur replies From Muralish | |
Heya everyone. I am a first-year student and doing a project for my C class. It is to do with John Conway's "Game of Life" as I am sure you are all aware of what that is. Here is the things needed. And after that is the code that I … | |
I came across this problem in one of my test papers. It says : Write a program that deletes itself( the exe file ) when run. Here's my first attempt and it didn't work, so I added the error-checking code. [code] /* This program tries to delete itself */ #include … | |
I'm trying to get the coordinates for the client section and the whole window. This is the code, but it gives me the same top, bottom, left and right for both the client and the window. The files are: T1NIU.h T1NIU.cpp T1NIUDlg.h T1NIUDlg.cpp This code is in the T1NIUDlg.cpp [code] … | |
i'm trying to convert a string into an integer by using atoi() function. but it gives me an error: error C2664: 'atoi' : cannot convert parameter 1 from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'const char *' No user-defined-conversion operator available that can perform this conversion, or the operator cannot … | |
Sorry for the rather newbish question. I'm stuck on part of this program, it seems simple enough :-| The user is prompted to enter a phone number in the format of: xxx-xxxx (the hyphen must be included). From there the phone number needs to be stored into an array of … | |
#include<stdio.h> #include<conio.h> struct node { int data; struct node *right, *left; }*root,*p,*q; struct node *make(int y) { struct node *newnode; newnode=(struct node *)malloc(sizeof(struct node)); newnode->data=y; newnode->right=newnode->left=NULL; return(newnode); } void left(struct node *r,int x) { if(r->left!=NULL) printf("\n Invalid !"); else r->left=make(x); } void right(struct node *r,int x) { if(r->right!=NULL) printf("\n Invalid … | |
Hi all. I need help creating a prog. in C that can count the occurrence of numbers. The prog. should go like this: Enter input 1 = 223335 Enter input 2 = 2 Output = The number 2 appears twice in "223335". The first input can be any 6 numbers … | |
hi guys , I am a first year student! can anyone help .. the code. is . [COLOR=RoyalBlue]main() { char *b="abc"; printf("%s",b); }[/COLOR] the output is :abc. my doubt is : how can we assign a string constant to a pointer.And when we assign like this is a character array … | |
You heard me, I want to know your guys' techniques for converting data types without using additional headers (such as studio.h). Are there any tricks or intrinsic methods? Can I write my own method? I simply don't like adding unnecessary headers becasue I don't use 95% of the crap that … | |
This is really simple code that prints the address of a variable : [code]int main() { int x; scanf("%d", &x ); printf("Address of x : %X, value : %d" ); return 0; }[/code]<< moderator edit: added [url=http://www.daniweb.com/techtalkforums/misc.php?do=bbcode#code][inlinecode][co[u][/u]de][/co[u][/u]de][/inlinecode][/url] tags >> Simple as that. But the thing is this program gives the … | |
I'm trying to put a status bar on a dialog based app. I have the following code in the OnInitDialog(): [code] if (!m_wndStatusBar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_BOTTOM) || !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT))) { TRACE0("Failed to create status bar\n"); return -1; // fail to create } else MessageBox("Status bar created", "Debug"); // … | |
I am developing an application that interefaces with a roll printer. When I am using the printer specific fonts, I am capable of send out a partial cut automatically once the document is finished (I am using the CDC class) Through my searchings of the internet, I have stumbled upon … | |
Hey guys and girls, im a n00b at the programming side of PC's but im trying to create not a pop-up but a sub window? does that make sense? like when you get an error message or when you get an information box up! can anyone help me with basic … | |
[code]class Thing { public: int Item; Thing (int Value); Thing (int Value1, int Value2); int GetValue1 () const; int GetValue2 () const; private: int DataItem1; int DataItem2; void SetValue1 (int Value); void SetValue2 (int Value); }[/code]<< moderator edit: added [url=http://www.daniweb.com/techtalkforums/misc.php?do=bbcode#code][inlinecode][co[u][/u]de][/co[u][/u]de][/inlinecode][/url] tags >> How many member functions does class Thing have? … | |
Hi, now i have work on it for a long time it is working but, when it can not find the item any how it will print item not found + item found , i have no idea what is wrong any help welcome, thanks [CODE] .... ... .. if( … | |
Greetings, i have been having problems trying to read from files using c programming. i succeeded in reading from .txt files and playing with the contents but i can't read al the contents of any .jpg or .doc file. please how do i go about this. i hve not tried … | |
Explanation is a bit long so please bear with me, solution is short :lol: We got an assigngment from uni to create word dictionary program to read an external file where each line consist of WORD and DEFINITION separated by empty space. If some word exists more than once add … |
The End.