Click here to Skip to main content
15,885,365 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Database creation on external HD Pin
David Crow26-Dec-15 5:26
David Crow26-Dec-15 5:26 
GeneralHello!I'm a young programmer from China Pin
Mike Covariant Lee23-Dec-15 1:39
Mike Covariant Lee23-Dec-15 1:39 
GeneralRe: Hello!I'm a young programmer from China Pin
Mike Covariant Lee23-Dec-15 1:41
Mike Covariant Lee23-Dec-15 1:41 
GeneralRe: Hello!I'm a young programmer from China Pin
CPallini23-Dec-15 2:29
mveCPallini23-Dec-15 2:29 
GeneralRe: Hello!I'm a young programmer from China Pin
Mike Covariant Lee23-Dec-15 18:00
Mike Covariant Lee23-Dec-15 18:00 
GeneralRe: Hello!I'm a young programmer from China Pin
Arthur V. Ratz29-Dec-15 21:34
professionalArthur V. Ratz29-Dec-15 21:34 
GeneralRe: Hello!I'm a young programmer from China Pin
Kleine schnappi8-Jan-16 23:23
Kleine schnappi8-Jan-16 23:23 
Questionplease fix my generic function Pin
Member 1150578522-Dec-15 9:04
Member 1150578522-Dec-15 9:04 
This program doesn't compile and gives me error "Conficting types of L search" . I ran out of all trials and I am so confused why the heck it gives me this error . I would appreciate your contributions to solve my problem .

the function does front back search of an array, if any number matches it sends back its address.

C#
   #include <stdio.h>

int main(void) {
	int arr []= {1,2,3,4,5,6,7,8,9,10} ; 
	int req = 5;

	Lsearch(arr,&req,10,4); // (sizeof(arr)/sizeof(int)),sizeof(req)
	
	
	return 0;
}


void *Lsearch(void *base,void *key,int n,int elemsize)
  {
  	for(int i = 0 ; i&lt;n;i++)
  	{
  		void *elemAddr = (char*)base + i*elemsize ;
  		if(memcmp(key,base,elemsize)==0) return elemAddr ;
  	}
  	return NULL ;
  }</pre>

AnswerRe: please fix my generic function Pin
Richard Andrew x6422-Dec-15 10:15
professionalRichard Andrew x6422-Dec-15 10:15 
GeneralRe: please fix my generic function Pin
Member 1150578522-Dec-15 21:29
Member 1150578522-Dec-15 21:29 
AnswerRe: please fix my generic function Pin
k505422-Dec-15 10:17
mvek505422-Dec-15 10:17 
GeneralRe: please fix my generic function Pin
Member 1150578522-Dec-15 21:28
Member 1150578522-Dec-15 21:28 
QuestionWhy CButton-derived class with BS_GROUPBOX style doesn't get messages? Pin
Yaumen19-Dec-15 20:45
Yaumen19-Dec-15 20:45 
QuestionRe: Why CButton-derived class with BS_GROUPBOX style doesn't get messages? Pin
Richard MacCutchan19-Dec-15 21:11
mveRichard MacCutchan19-Dec-15 21:11 
AnswerRe: Why CButton-derived class with BS_GROUPBOX style doesn't get messages? Pin
Yaumen19-Dec-15 21:28
Yaumen19-Dec-15 21:28 
AnswerRe: Why CButton-derived class with BS_GROUPBOX style doesn't get messages? Pin
Jochen Arndt20-Dec-15 0:13
professionalJochen Arndt20-Dec-15 0:13 
GeneralRe: Why CButton-derived class with BS_GROUPBOX style doesn't get messages? Pin
Yaumen20-Dec-15 7:41
Yaumen20-Dec-15 7:41 
Questionhow to develop a code for deleting duplicate value of an array from right left? Pin
Member 1221414918-Dec-15 7:04
Member 1221414918-Dec-15 7:04 
SuggestionRe: how to develop a code for deleting duplicate value of an array from right left? Pin
Richard MacCutchan18-Dec-15 7:35
mveRichard MacCutchan18-Dec-15 7:35 
AnswerRe: how to develop a code for deleting duplicate value of an array from right left? Pin
David Crow20-Dec-15 7:40
David Crow20-Dec-15 7:40 
QuestionHow to increase memory to avoid exception std::bad_alloc? Pin
Javier Luis Lopez16-Dec-15 23:36
Javier Luis Lopez16-Dec-15 23:36 
AnswerRe: How to increase memory to avoid exception std::bad_alloc? Pin
Jochen Arndt17-Dec-15 0:03
professionalJochen Arndt17-Dec-15 0:03 
GeneralRe: How to increase memory to avoid exception std::bad_alloc? Pin
Javier Luis Lopez17-Dec-15 0:41
Javier Luis Lopez17-Dec-15 0:41 
GeneralRe: How to increase memory to avoid exception std::bad_alloc? Pin
Jochen Arndt17-Dec-15 0:50
professionalJochen Arndt17-Dec-15 0:50 
GeneralRe: How to increase memory to avoid exception std::bad_alloc? Pin
Javier Luis Lopez17-Dec-15 1:03
Javier Luis Lopez17-Dec-15 1:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.