|
You come into MSDN, read topic related to CWinThread
-----------------
conglt
|
|
|
|
|
I am using a new interface using "dispinterface keyword". Can I inherit this interface from an already existing inteface. If yes, what is the syntax ?
If no, what is way around and what is wrong in my understanding ???
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg."
- Bjarne Stroustrup
|
|
|
|
|
I M GETTING A FATAL ERROR WHEN GOING TO COMPILE MY VC++ FILE THAT TAKES SOME COMMAND LINE INPUT.
PLEASE HELP ME BETTER IF ANYONE CAN GIVE ME A COMPLETE CODE
JAI
|
|
|
|
|
Hi,
Try to restart your system and also vc++ ..
what program are u trying to do??
|
|
|
|
|
parichaybp wrote: Try to restart your system and also vc++ ..
Uuh??
|
|
|
|
|
read "Try to format your HDD"
this solution always resets compilation problems...
ps: did you receive my mail ?
|
|
|
|
|
That will be the ultimate option.
|
|
|
|
|
jai_sendme wrote: I M GETTING A FATAL ERROR WHEN GOING TO COMPILE MY VC++ FILE THAT TAKES SOME COMMAND LINE INPUT.
What does your program's command-line acceptance have to do with a compilation error?
jai_sendme wrote: PLEASE HELP ME BETTER IF ANYONE CAN GIVE ME A COMPLETE CODE
Complete code to what?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Please, don't SHOUT
And then provide more information. What is this fatal error. Please give as much RELEVANT details as possible. We are not gods, how can we know which error it is.
Is it a compile error, a linker error, a runtime error ? Then post the exact message.
If it's a runtime error, use your debugger first to find where it crashes.
|
|
|
|
|
you beat me to it
|
|
|
|
|
I think we'll never know what he was talking about.
|
|
|
|
|
ced',
off topic but, did you receive my mail ?
(sorry if i am a bit insistant about that, but i'm desperate about it[^], and i'm sure you could be of any useful help )
|
|
|
|
|
Err, no, I didn't get your mail.
But I answered to your question. I'm not sure at all if this is the correct answer though...
|
|
|
|
|
thank you.
i answered consequently.
i'd be glad to share this with you...
(actually, you'd save me my nerves ! lol)
|
|
|
|
|
Yes Dear ,
It is a linker error.
|
|
|
|
|
Then you got a linker problem...
Sorry but if you don't give more information, it's the only answer I can give. What is the exact error message ? And give as much relevant info as possible.
|
|
|
|
|
1. DON'T SHOUT
2. explain clearly what you wnat to do
3. explain clearly what problem(s) you encounter
4. ask for specific questions, instead of hoping someone will do the job for you...
|
|
|
|
|
whenever i compile my code it gets compiled without error.
but when i build it's EXE it gives me external linker error.
please help
|
|
|
|
|
jai_sendme wrote: but when i build it's EXE it gives me external linker error.
please help
We're not mind readers. What's the error?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
:(I have an MDI application and once i open two or more child windows/views at a time, then the data are not updated and are not affecting on the child windows.
Could any one help me out?
-- modified at 7:55 Friday 14th April, 2006
|
|
|
|
|
To refresh the views use
CDocument::UpdateAllView(NULL)
that force an update of the CView
and then use CView::OnUpdate
to initialize the view assuming that the document is changed so everything(variables) must be reloaded from the document.
Elseway, a simple way is to study the constructor of the CView, probally you are not considering that the first CView has an initialization that you forgot in the other Views.
Have a nice code day
|
|
|
|
|
thanks
|
|
|
|
|
Hi,
i written a console application from VC++, program is to generate a binary tree.
program will take a directory as a input and generate a binary tree of words..
problem is if i give a small directory with 5 to 10 files program generates the binary tree properly if i select a big folder it gives below error can anyone help with this..???
=====================================================
This instruction at "0X77f8910e" referenced memory at "0xc7c7cf0".The memory could not be "read".
Click OK to terminate the program
Click on cancel to debug the program
OK CANCEL
=======================================================
Regards,
Parichay.
|
|
|
|
|
You may have to check those size indicators / holders in your code as array boundary or something.
Maxwell Chen
|
|
|
|
|
Hi ,
Thanks for the reply.
Can u plz check my code and tell me where the error is and why it is getting generated..?//
/// Program to Generate Binary Tree of multiple files and multiple words.
#include <iostream.h>
#include <stdio.h>
#include <assert.h>
#include <io.h>
#include <direct.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#define MAXWORD 100
struct tnode *addtree(struct tnode *,char *);
void treeprint(struct tnode *);
#define length (80)
struct tnode
{
char *word;
struct tnode *left;
struct tnode *right;
};
struct tnode *root1 = NULL;
struct tnode *talloc(void)
{
return (struct tnode *) malloc(sizeof(struct tnode));
}
char *strdup(char *s)
{
char *p;
p=(char *) malloc(strlen(s)+1);
if(p!=NULL)
strcpy(p,s);
return p;
}
//addtree add a node with w at or below p
struct tnode *addtree(struct tnode *p,char *w)
{
int cond;
if(p==NULL)
{
p=talloc();
p->word=strdup(w);
p->left=p->right=NULL;
}
else
if((cond=strcmp(w,p->word)) == 0) ;
else
if(cond < 0)
p->left=addtree(p->left,w);
else
p->right=addtree(p->right,w);
return p;
}
// treeprint : in order
void treeprint(struct tnode *p)
{
if(p!=NULL)
{
treeprint(p->left);
printf("%s\n",p->word);
treeprint(p->right);
}
}
void ListWords (char *);
#define MAX_LEN 100
int main ()
{
char dir[] = "D://Parichay/";
ListWords(dir);
printf("\n\n\t\t Binary Tree :- Each Node Contains 1 word.\n\n");
treeprint(root1);
return 0;
}
/////////Function to list words//////
void ListWords (char *dir)
{
struct _finddata_t file_s;
long File_handle;
char name[MAX_LEN], words[length];
int j,size;
_chdir(dir);
if( (File_handle = _findfirst( "*", &file_s )) == -1L )
{
printf( "No files in current directory!\n" );
}
else
if (file_s.attrib & _A_NORMAL)
{
sprintf (name, "%s",dir);
//root = addtree (root, name);
////////////////
FILE *fp;
fp = fopen(name, "r");
if(fp == NULL)
{
printf("\n\n Message from _A_NORMAL.");
printf("\n\nERROR: could not open file");
exit(EXIT_FAILURE);
}
else
while (fscanf(fp, "%s", &words)!= -1) //while not the end of the file
{
size = strlen(words); /*determines length of each string */
for(j = 0; j<size; j++)="" *begins="" iteration="" of="" each="" string="" looking="" for="" non-alpha="" characters="" then="" it="" lower="" cases="" all="" *=""
="" {
="" if="" (words[j]="='.'" ||="" words[j]="=','" j++;="" *removes="" non="" alpha-characters="" strlwr(words);="" printf("%c",="" words[j]);="" *prints="" to="" screen="" words=""
="" root1="addtree" (root1,="" words);
="" }
="" fclose(fp);
="" }="" else="" do="" (strcmp="" (file_s.name,="" ".")="=" 0="" strcmp="" "..")="=" 0)
="" continue;
="" (strlen="" (dir)="" +="" strlen="" (file_s.name)="" 2=""> sizeof (name))
{
fprintf (stderr, "Dir name too long\n");
return;
}
if (file_s.attrib & _A_SUBDIR)
{
sprintf (name, "%s/%s",dir, file_s.name);
ListWords(name);
}
else
{
sprintf (name, "%s/%s",dir ,file_s.name);
//printf ("%s\n",name);
////////////////
FILE *fp;
fp = fopen(name, "r");
if(fp == NULL)
{
printf("\n\n Message from _A_SUBDIR");
printf("\nERROR: could not open file.\n\n");
exit(EXIT_FAILURE);
}
else
while (fscanf(fp, "%s", &words)!= -1) //while not the end of the file
{
size = strlen(words); /*determines length of each string */
for(j = 0; j
|
|
|
|