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

C / C++ / MFC

 
Questionsort CListCtrl specially Pin
includeh105-Apr-10 6:18
includeh105-Apr-10 6:18 
QuestionRe: sort CListCtrl specially Pin
David Crow5-Apr-10 16:36
David Crow5-Apr-10 16:36 
Questionc progrmng code help for the following algo Pin
abhijit.hzrk5-Apr-10 5:38
abhijit.hzrk5-Apr-10 5:38 
AnswerRe: c progrmng code help for the following algo Pin
Chris Losinger5-Apr-10 8:07
professionalChris Losinger5-Apr-10 8:07 
Questioncode page Pin
Member 5903105-Apr-10 2:28
Member 5903105-Apr-10 2:28 
AnswerRe: code page Pin
Emilio Garavaglia5-Apr-10 20:42
Emilio Garavaglia5-Apr-10 20:42 
QuestionNeed to get .obj file names of Executable(which one is crrently executing) at runtime programatically in VC++? [modified] Pin
glitteringsound5-Apr-10 2:09
glitteringsound5-Apr-10 2:09 
AnswerRe: Need to get .obj file names of Executable(which one is crrently executing) at runtime programatically in VC++? Pin
enhzflep5-Apr-10 2:41
enhzflep5-Apr-10 2:41 
Well, presumably the obj files will take the same name as the cpp files - differing only in the extension.

Also, being lowly .obj files, they won't necessarily exist in the installed version of the program (nor am I able see a reason at this time to choose to include them)

Sooo, I'd just use the _FILE_ macro and do a string replace on the extension, changing it from .cpp to .obj

Here's about the cheapest, nastiest example I can think of right now. I'll leave it to you to figure out how to change the folder names...

#include <iostream>

using namespace std;

int main()
{
    char *buffer;
    char *insertPos;

    cout << "Source File name: " << __FILE__ << endl;

    buffer = new char[strlen(__FILE__)+1];
    strcpy(buffer, __FILE__);
    insertPos = strstr(buffer, ".cpp");
    strcpy(insertPos, ".obj");
    cout << "OBJ File name: " << buffer << endl;
    delete buffer;

    return 0;
}

GeneralRe: Need to get .obj file names of Executable(which one is crrently executing) at runtime programatically in VC++? Pin
glitteringsound5-Apr-10 3:03
glitteringsound5-Apr-10 3:03 
GeneralRe: Need to get .obj file names of Executable(which one is crrently executing) at runtime programatically in VC++? Pin
enhzflep5-Apr-10 3:28
enhzflep5-Apr-10 3:28 
AnswerRe: Need to get .obj file names of Executable(which one is crrently executing) at runtime programatically in VC++? Pin
Chris Meech5-Apr-10 4:54
Chris Meech5-Apr-10 4:54 
Questionlocalization issue Pin
Member 5903105-Apr-10 0:14
Member 5903105-Apr-10 0:14 
QuestionCListCtrl SortGroups by name Pin
Abinash Mohanty4-Apr-10 23:14
Abinash Mohanty4-Apr-10 23:14 
AnswerRe: CListCtrl SortGroups by name Pin
David Crow2-Jan-11 15:01
David Crow2-Jan-11 15:01 
QuestionC++ socket and thread [modified] Pin
canard294-Apr-10 22:29
canard294-Apr-10 22:29 
AnswerRe: C++ socket and thread Pin
Moak4-Apr-10 23:29
Moak4-Apr-10 23:29 
GeneralRe: C++ socket and thread Pin
canard295-Apr-10 2:14
canard295-Apr-10 2:14 
GeneralRe: C++ socket and thread Pin
Moak5-Apr-10 3:04
Moak5-Apr-10 3:04 
GeneralRe: C++ socket and thread Pin
canard295-Apr-10 4:47
canard295-Apr-10 4:47 
GeneralRe: C++ socket and thread Pin
Moak5-Apr-10 8:25
Moak5-Apr-10 8:25 
QuestionListview row color Pin
arun_pk4-Apr-10 22:26
arun_pk4-Apr-10 22:26 
AnswerRe: Listview row color Pin
Code-o-mat5-Apr-10 0:30
Code-o-mat5-Apr-10 0:30 
AnswerRe: Listview row color Pin
Rolf Kristensen12-Apr-10 9:33
Rolf Kristensen12-Apr-10 9:33 
Questionerror C2440 Pin
MsmVc4-Apr-10 21:28
MsmVc4-Apr-10 21:28 
AnswerRe: error C2440 Pin
Adam Roderick J4-Apr-10 21:35
Adam Roderick J4-Apr-10 21:35 

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.