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

C / C++ / MFC

 
QuestionRe: Assert failure when I comment SetRegistryKey(_T("Local AppWizard-Generated Applications")) Pin
David Crow28-Feb-16 16:20
David Crow28-Feb-16 16:20 
Questionwhere "FindFirstFile" fetch drive information ? Pin
shanmugarajaa26-Feb-16 18:44
shanmugarajaa26-Feb-16 18:44 
AnswerRe: where "FindFirstFile" fetch drive information ? Pin
Richard MacCutchan26-Feb-16 21:53
mveRichard MacCutchan26-Feb-16 21:53 
AnswerRe: where "FindFirstFile" fetch drive information ? Pin
David Crow28-Feb-16 16:22
David Crow28-Feb-16 16:22 
QuestionHow to dynamically update gdiplus bitmap object in MFC? Pin
Kiran Satish26-Feb-16 7:45
Kiran Satish26-Feb-16 7:45 
AnswerRe: How to dynamically update gdiplus bitmap object in MFC? Pin
Chris Losinger26-Feb-16 8:44
professionalChris Losinger26-Feb-16 8:44 
GeneralRe: How to dynamically update gdiplus bitmap object in MFC? Pin
Kiran Satish26-Feb-16 9:55
Kiran Satish26-Feb-16 9:55 
Newserror:Segmentation fault (core dumped) Pin
Van Nguyen26-Feb-16 2:47
Van Nguyen26-Feb-16 2:47 
When I am trying run program, command line for ubuntu generation error that.
I'm trying run compline program with command /build/LSB/LSB$ ./thanhtmLSBext Girl.emb.bmp
This is code of my:
File c: thanhtmLSBext.c

include <stdio.h>


include <cv.h>

include <cxcore.h>

include <cvaux.h>

include <highgui.h>

int *alloc_int_1D(int rows);
void free_int_1D(int *array);

int main(int argc, char** argv)
{
int i, j, n = 0;
IplImage* img;
FILE *fp;
int fp_size;
int wm;
 char filename = argc &gt;= 2 ? argv[1] : (char*)"Girl.emb.jpg";
 if( (img = cvLoadImage( filename, 1)) == 0 )
     return -1;

 fp = fopen( "extract.gray", "wb" );
 if( fp == NULL )
 {
      puts( "extract.grayが開けません" );
      return -1;
 }

 wm = (int *)alloc_int_1D(64*64*10);
 for(i = 0; i &lt; 64*64*10; i++){
      wm[i] = 0;
 }

 CvScalar s;
 int h=img-&gt;height;
 int w=img-&gt;width;

 for(i=0; i&lt;w;&gt;          for(j=0; j&lt;h;&gt;               s=cvGet2D(img,i,j);
           wm[n] = (int)(s.val[0])%2;
           fputc(wm[n]255,fp);
           n++;
      }
 }

 cvReleaseImage(&img);
 free_int_1D(wm);
 fclose(fp);

 return 1;

}
/
IplImage* embed(IplImage *img, int wm, int N){
IplImage img1;
int i, j, n = 0;
img1 = cvCreateImage( cvGetSize(img), IPL_DEPTH_8U, 3);
CvScalar s,s1;
int h=img->height;
int w=img->width;
 for(i=0; i&lt;w;&gt;          for(j=0; j&lt;h;&gt;               s=cvGet2D(img,i,j);
           s1.val[0]=s.val[0] + (double)wm[n%N]/255 - (double)((int)(s.val[0])%2);
           s1.val[1]=s.val[1];
           s1.val[2]=s.val[2];
           cvSet2D(img1,i,j,s1);
           n++;
      }
 }

}
*/

int *alloc_int_1D(int rows) {
int *p;

p = (int *)malloc(rows * sizeof(int));
if (!p) {
ifdef DEBUG
  fprintf(stderr, "alloc_int(): malloc() failed\n");
  exit(1);

else
  return NULL;

endif

}

return p;
}

void free_int_1D(int *array) {
free(array);
}
I hope everybody will help me. Thanks you.
GeneralRe: error:Segmentation fault (core dumped) Pin
Jochen Arndt26-Feb-16 3:04
professionalJochen Arndt26-Feb-16 3:04 
QuestionDifficulty in getting iterator upon using find algorithm of STL Pin
Member 1235353126-Feb-16 0:50
Member 1235353126-Feb-16 0:50 
AnswerRe: Difficulty in getting iterator upon using find algorithm of STL Pin
Jochen Arndt26-Feb-16 0:59
professionalJochen Arndt26-Feb-16 0:59 
AnswerRe: Difficulty in getting iterator upon using find algorithm of STL Pin
Jochen Arndt26-Feb-16 1:55
professionalJochen Arndt26-Feb-16 1:55 
GeneralRe: Difficulty in getting iterator upon using find algorithm of STL Pin
Member 1235353126-Feb-16 2:30
Member 1235353126-Feb-16 2:30 
GeneralRe: Difficulty in getting iterator upon using find algorithm of STL Pin
Jochen Arndt26-Feb-16 2:43
professionalJochen Arndt26-Feb-16 2:43 
GeneralRe: Difficulty in getting iterator upon using find algorithm of STL Pin
Member 123535317-Mar-16 19:23
Member 123535317-Mar-16 19:23 
GeneralRe: Difficulty in getting iterator upon using find algorithm of STL Pin
Jochen Arndt7-Mar-16 21:41
professionalJochen Arndt7-Mar-16 21:41 
QuestionDLL Features Pin
bkelly1324-Feb-16 12:53
bkelly1324-Feb-16 12:53 
AnswerRe: DLL Features Pin
Jochen Arndt24-Feb-16 21:24
professionalJochen Arndt24-Feb-16 21:24 
AnswerRe: DLL Features Pin
Richard MacCutchan24-Feb-16 21:34
mveRichard MacCutchan24-Feb-16 21:34 
Questioncontrol #define directive Pin
p3im4n24-Feb-16 4:34
p3im4n24-Feb-16 4:34 
SuggestionRe: control #define directive Pin
Jochen Arndt24-Feb-16 4:57
professionalJochen Arndt24-Feb-16 4:57 
AnswerRe: control #define directive Pin
Richard MacCutchan24-Feb-16 8:25
mveRichard MacCutchan24-Feb-16 8:25 
QuestionAssertion From SendNotifyMessage Pin
ForNow24-Feb-16 3:28
ForNow24-Feb-16 3:28 
AnswerRe: Assertion From SendNotifyMessage Pin
Jochen Arndt24-Feb-16 3:50
professionalJochen Arndt24-Feb-16 3:50 
GeneralRe: Assertion From SendNotifyMessage Pin
ForNow24-Feb-16 5:45
ForNow24-Feb-16 5:45 

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.