cómo representar la extensión del archivo en StringCbCatN () [duplicado]

Here is the piece of code which display all files in the folder.

StringCbCopyN (DirSpec, BUFSIZE, argv[1], length_of_arg+1); 
StringCbCatN (DirSpec, BUFSIZE, "\\*", 3); //this is the exact line to display all the files in folderNow i want to select all .b11 extension files in console window.

I tired these below thingd which couldnt work for me.Kindly give me any idea or suggestion to select these extension files.

StringCbCatN (DirSpec, BUFSIZE, "\*.b11", 3); 


StringCbCatN (DirSpec, BUFSIZE, "*.b11", 3);
StringCbCatN (DirSpec, BUFSIZE, "\\.b11", 3);

preguntado el 01 de febrero de 12 a las 04:02

Haven't you searched on Net ? -

"but still get the errors." What errors? -

2 Respuestas

hari, I already told you that to use TCHAR strings, you should be using the functions in #include <strsafe.h>.

contestado el 23 de mayo de 17 a las 15:05

VC2008 supports strcpy(), strcat(), etc; they are declared in "string.h".

It debemos trabajo.

Q: Could you please cut/paste the following:

1) an instance of where you're using "strcpy()" in your code?

2) the exact error message (which should correspond to the line you cut/pasted above)

Gracias de antemano

ADENDA:

I happen to have VS2008 installed on my laptop, and verified strcpy() and friends work just fine:

#include <string.h>
#include <stdio.h>

int
main (int argc, char *argv[])
{
  char *hello = "Hello world";
  char s[80];
  strcpy (s, hello);
  printf ("%s\n", s);
  return 0;
}

<= THIS COMPILES AND RUNS WITHOUT ERROR

Respondido 01 Feb 12, 08:02

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.