15,551 Topics
| |
dll problem,help me:) i create dll project ,the dll is Use MFC in a Static Library i hope exe call ListCtrl class from dll ==================DLL==================== <<<<<<<<<<ListCtrl.h>>>>>>>>>>>>>>> [code=c] #pragma once class AFX_EXT_CLASS ListCtrl :public CListCtrl { public: __declspec(dllexport) ListCtrl(); __declspec(dllexport) ~ListCtrl(); public: DECLARE_MESSAGE_MAP(); public: afx_msg void OnNMClick(NMHDR *pNMHDR, LRESULT *pResult); }; … | |
The problem is that when I enter the choice, nothing happens and the answer remains 0. Please help I'm new at this and I tried everything!! Thanks [code=c] #include <stdio.h> #include <conio.h> main () { int a,b; float answer; char choice; clrscr(); printf ("\nEnter a number: "); scanf ("%d",&a); printf … | |
In response to Hike34's thread to add a \ character to a CString, I think the \ character has a meaning in such strings and to use it in a string it should itself be preceded by a \ character CString word="hello world"; word+="\"; // or "''" doesn't work... Instead … | |
Hi i hav executed the following c code..the inner printfs executes first and prints some garbage value...why dont the outer printf prints anything... i got only one garbage value y dont two garbage values....wt s the order of precedence in printf function and in nested printfs.... the c code is … | |
Hello can anyone help me with the following The below will actually display the Name found part, even though no name actually exists and its just blank, how do i get round this, the string name will contain blanks, but i need to check if blank, then treat as blank. … | |
The following profram is not compiled. Why? Please help me! //This is a file copy utility// [code] #include<stdio.h> #include<conio.h> main(int argc, char argv[]) { FILE *fs,*ft; char ch; if(argc!=3) { puts("Insufficient Arguments!"); exit(); } fs=fopen(argv[1],"r"); if(fs==NULL) { puts("Cannot open Source file"); exit(); } ft=fopen(argv[2],"w"); if(ft==NULL) { puts("Cannot open Source file"); … | |
Hi, Once I had a similar problem when I tried to read a binary file on a pc and I failed, but I was able to read it in Linux (there were actually different versions of the file), so I figured it's a corrupted file, thou the hex dump looked … | |
Hi, I have written the code of checking already, but I have got two problems here. 1. I don't know why when I enter the number in, when it prints out the number, it becomes smilies or some kind of maths code. Please tell me what I have done wrongly … | |
All I'm trying to do is write a very simple loop program in C to enter the ages of four sprogs between 5 and 7. To display their total and average age using do, while and if statements. I also need to display an error message if an invalid number … | |
I have a basic question with a for loop statement where I have a function thats creating input nodes inside my animation program. The name thats assigned to the input that the function creates is "InputNum" . How do I tack on the value of i to the end of … | |
problem about font i write CMFont class,it inheritance CFont e.g: [code] class CMFont:public CFont {..........}; ======================== CMFont font; font.CreateFont(...); GetDlgItem(IDC_FONTID)->SetFont(&font);[/code] [code] error error C2664: 'CWnd::SetFont' : cannot convert parameter 1 from 'CMFont **__w64 ' to 'CFont *'[/code] how to CMFont convert CFont thank:) | |
[B]Hey i have been working C, But i need to do a Convolution progrm in C, So pls advice on this matter How to initialize..[/B] | |
does anyone know how I can write to a xls that puts each number in different cells? for example, [CODE]vector<int> nums; nums.push_back(1); nums.push_back(2); nums.push_back(3); ofstream myfile; myfile.open("C:/example.xls") myfile << nums[1] << " " << nums[2] << " " nums[3] << endl; myfile.close()[/CODE] how do i put three numbers in different … | |
i need to write a program that- allow the user to enter the number of students-allow the user to enter each mark-calculate the frequency for each mark-the interval that exists between identical marksthis is what i have donei want to know if there is a different way of doing it#include#define … | |
[code]/* a program to find all the permutations of an input string pointers are not allowed*/ #include <stdio.h> #include <string.h> #include <conio.h> void main() { clrscr(); int num =0; char buff[20] ; printf("Enter the string\n"); scanf("%s",buff); int len = strlen(buff); printf("%s\n",buff); for(int i=0;i<len;i++) { for(int j=1;j<len;j++) { for(int k=j+1;k<len;k++) { … | |
could u tell me the use of static storage class before a function...like static add(); could u tell me a good link to get collection of programes in c language.... Thnaku and Regards. | |
i need to write a program that- allow the user to enter the number of students-allow the user to enter each mark-calculate the frequency for each mark-the interval that exists between identical marksthis is what i have donei want to know if there is a different way of doing it … | |
the function first search a word from the linked list. if found it then increment the numWords (number of words in listfor that word) and if not found it shoud create a new node for the word. the code is: [CODE]void AddWords( char text[30]) { check=head; while (check!=NULL) { if … | |
Hello, I need to write a program that runs along with an emulator. The goal of my program is to intercept certain keystrokes before the emulator gets them, and then send the emulator back some different keystrokes. I want the program to use as few CPU resources as possible, as … | |
We cannot have static friend function............ because 1.since static member functions can access only static data members...where as friend function can access all the members. 2.Friend function also require an object to access the members...where as static member functions can not. 3. Another thing ....since friend functions are non-member functions....and … | |
Hi I was goinf through the GTK code and saw that GTK code uses pointer for structs and not normal instances of the same structs... why could this be so? My take is that they wanted to use just one variable name and they can easily initialise the pointer to … | |
i have this line of code and want to compare the word from the linked list with the one supplied by user. the code is: [CODE] if (strcmp(p->word,word)==0)[/CODE] and i am having this error: [COLOR="Red"]passing `char' to argument 2 of `strcmp(const char *, const char *)' lacks a cast[/COLOR] | |
I am supposed to use get the user input of a filename and then open that file and print to the screen (the first line-- that I will do later), and I can't figure out what I am doing wrong. Thank you. [code] #include <stdio.h> main() { char s[1000]; printf("Enter … | |
I am taking a programming course, and since we have not been introduced to string functions (puts(), gets(), etc) I need to take some input from the user using scanf. The assignment is to read a DNA sequence, storing it in a char array. The array must be 512 characters, … | |
[code]#include <stdio.h> int function1(int a) { return(a*a*a); } int function2(int b) { int i; int sum = 0; for (i=1; i<=b; i++) sum += function1(i); return(sum); } int main () { int n, result; printf("Enter n\n"); scanf("%d", &n); result = function2(n); printf("Result = %d\n", result); system("pause"); return(0); } [/code] Explain … | |
i don't know why this program doesn't work.. it just keep on saying that it have errors..... pleae help!! please help!! [code] #include <stdio.h> #define LEX_LEN 1024 enum chars{ LETTER, DIGIT, UNKNOWN,ZERO,TULDOK, WHITESPACE,SEMICOLON,QUOTED,PLUS,MINUS, DIVIDE,LT,GT,EQ,ASS2,OPARENT,CPARENT }; enum Token { STOP, NUM, STRING,STMTSEP,QUOTED_CHAR,ERROR,ADDOPERATOR,MINUSOPERATOR,DIVIDEOPERATOR,SIGNEDNUM, SEMI,LTHAN,GTHAN,EQUAL,ASS,OPEN_PARENT,CLOSE_PARENT }; chars charclass; char nextchar; char parse_me[] = … | |
can someone please help me to write a code in c to do the following: 1)read words from a file 2)store the words in a linked list 3)read the words and display 4)count the number of words in list | |
I want to find the length of a string, But the strlen function seems only to work with chars. I can't use a char[] to store my text because the size must be known beforehand and I don't know it. So I read everything into a string, then tried to … | |
Hi, Just to make things obvious, I am a student. I have been learning C given an assignment to code a program similar to that used on the Voyager 9 probe. It uses hadamard matrices to make sure that bits transmitted through space have redundancy and are not lost. Each … | |
I'm having touble trying to send arrays from funciton to function. The thing I can't do is make a global variable (one of the rules set by the teacher). I don't know what I'm doing really, so let me know if it's even doable. |
The End.