Author Topic: C/C++ programmers.. need some help.  (Read 20690 times)

Offline [N]auTiCa

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
    • Extreme Online Gaming
  • Rated:
C/C++ programmers.. need some help.
« on: March 26, 2007, 10:14:54 AM »
OK.. it's been awhile since I last asked for help from my Q2'ers.. but I need help again.

Currently, I have to take a open source program and implement a simple feature into it.

The program is "A Note" and it has the ability to import/export in .xml
Site: http://a-note.sourceforge.net/
Download: http://sourceforge.net/project/showfiles.php?group_id=85069

All that needs to be done is, add a menu option to import/export in .txt

Thats it!

I've tried and tried and I get errors.. so I'm stuck.

Those willing to help.. I can reward you somehow. I need this asap, so those interested please let me know. Thanks.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
Clan ^K][L^  co-leader! www.clankil.com
dC member! www.monsterkill.org

Offline reaper

  • Opulent Member
  • *
  • Posts: 2872
  • Nice night for a walk, eh? - Nice night for a walk
    • View Profile
  • Rated:
Re: C/C++ programmers.. need some help.
« Reply #1 on: March 26, 2007, 11:53:26 AM »
since you didn't post any information, i'm assuming you don't know what your doing, and maybe you should read up.  but i post some crazy shit on here, and i've actually gotten some help (although i hope i'm posting more information than you)

is the source compiling for you okay..?

i've taken 4 classes in C/C++ programming, that was five years ago, since then i haven't done any programming, but I can probably help you.
« Last Edit: March 26, 2007, 12:10:44 PM by reaper »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
VaeVictus "reaper is a lying sack of shit and ragequit then had, probably slugs, come alias and beat me, wasnt even the same person playing OBVIOUSLY, accuracies basicly doubled, and strategy

Offline [N]auTiCa

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
    • Extreme Online Gaming
  • Rated:
Re: C/C++ programmers.. need some help.
« Reply #2 on: March 26, 2007, 02:11:41 PM »
Obviously if I'm needing help I don't know what I'm doing?
I've also posted for crazy help in the past and my good friend quadz was nice enough to help :P
Anyways.. I'm assuming the 'MainFrm.cpp" file needs editing somewhere in CMainFrame::OnTraymainImportexportImport()

Code: [Select]
void CMainFrame::OnTraymainImportexportImport()
{
// Import notes

OPENFILENAME ofn;     
TCHAR szFile[260];     

szFile[0] = NULL;
ZeroMemory(&ofn, sizeof(OPENFILENAME));
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = m_hWnd;
ofn.lpstrFile = szFile;
ofn.nMaxFile = sizeof(szFile);
ofn.lpstrFilter=_T("A Note file (*.xml)\0*.xml");
ofn.nFilterIndex = 1;
ofn.lpstrFileTitle = NULL;
ofn.nMaxFileTitle = 0;
ofn.lpstrInitialDir = NULL;
ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;

if (GetOpenFileName (&ofn) != TRUE) return;

CString szName;
szName = CString (ofn.lpstrFile);

Load (szName);
}

As for the errors, it's just not loading headers correctly.. I need to try a different editor and see what I can come up with.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
Clan ^K][L^  co-leader! www.clankil.com
dC member! www.monsterkill.org

Offline console

  • Brobdingnagian Member
  • ***
  • Posts: 4518
  • "Man, this is the way to travel," said my attorney
    • View Profile
    • tastyspleen.net
  • Rated:
Re: C/C++ programmers.. need some help.
« Reply #3 on: March 26, 2007, 02:48:52 PM »
If you can show me the code you've added to try to accomplish the .txt import/export, and if you can show me the errors you're getting when you try to compile, I can probably offer some pointers.

I take it this is an MFC app...  I'm no MFC expert--but I use it when I have to.


Regards,

:afro:
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline reaper

  • Opulent Member
  • *
  • Posts: 2872
  • Nice night for a walk, eh? - Nice night for a walk
    • View Profile
  • Rated:
Re: C/C++ programmers.. need some help.
« Reply #4 on: March 26, 2007, 06:02:47 PM »
i'm not sure where you at.  i think you need to be compiling this application with a visualC++ compiler.  from what i read, gcc, and other non visualC++ compilers will not understand the source.  I went to download VisualC++ express (which is free from microsoft) but it's 68 megs, and i have to use my cell for the net which is real slow.

what compiler are you using, how are you compiling the source, and what are the errors
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
VaeVictus "reaper is a lying sack of shit and ragequit then had, probably slugs, come alias and beat me, wasnt even the same person playing OBVIOUSLY, accuracies basicly doubled, and strategy

Offline [N]auTiCa

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
    • Extreme Online Gaming
  • Rated:
Re: C/C++ programmers.. need some help.
« Reply #5 on: March 26, 2007, 06:33:21 PM »
Yes console.. this is an MFC app. I personally have not had any experience with MFC, so much of this is quite new to me.

I'm using Borland 2006.. and from what I understand I need VS 2003 in order for this to compile correctly.
I will try and download VS express, but it doesn't have a debugger.. so that won't be much good :(

Here is my edited code...

Code: [Select]
void CMainFrame::OnTraymainImportexportImport()
{
// Import notes

OPENFILENAME ofn;
TCHAR szFile[260];
\\\\ADDED THE STRING BELOW\\\\
TCHAR szFilter[260];

szFile[0] = NULL;
ZeroMemory(&ofn, sizeof(OPENFILENAME));
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = m_hWnd;
ofn.lpstrFile = szFile;
ofn.nMaxFile = sizeof(szFile);
ofn.lpstrFilter=_T("A Note file (*.xml)\0*.xml");

\\\\ADDED THE TEXT FILE OPTION BELOW\\\\
ofn.lpstrFilter=_T("A Text File (*.txt)\0*.txt");

ofn.nFilterIndex = 1;
ofn.lpstrFileTitle = NULL;
ofn.nMaxFileTitle = 0;
ofn.lpstrInitialDir = NULL;
ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;

if (GetOpenFileName (&ofn) != TRUE) return;

CString szName;
szName = CString (ofn.lpstrFile);

Load (szName);
}

void CMainFrame::OnTraymainImportexportExport()
{
// Export notes

OPENFILENAME ofn;     
TCHAR szFile[260];
TCHAR szFilter[260];

szFile[0] = NULL;
ZeroMemory(&ofn, sizeof(OPENFILENAME));
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = m_hWnd;
ofn.lpstrFile = szFile;
ofn.nMaxFile = sizeof(szFile);
ofn.lpstrFilter=_T("A Note file (*.xml)\0*.xml");
ofn.lpstrFilter=_T("A Text File (*.txt)\0*.txt");
ofn.nFilterIndex = 1;
ofn.lpstrFileTitle = NULL;
ofn.nMaxFileTitle = 0;
ofn.lpstrInitialDir = NULL;
ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;

if (GetSaveFileName (&ofn) != TRUE) return;

CString szName;
szName = CString (ofn.lpstrFile);

// Add .xml
szName.MakeLower ();
if (szName.Right (4) != _T(".xml"))
szName += _T(".xml");

// Save the file
Save (szName);
}

here are the errors
Code: [Select]
[C++ Error] stdafx.h(15): E2209 Unable to open include file 'afxwin.h'
[C++ Error] stdafx.h(18): E2209 Unable to open include file 'afxext.h'
[C++ Error] stdafx.h(19): E2209 Unable to open include file 'afxdisp.h'
[C++ Error] stdafx.h(20): E2209 Unable to open include file 'afxdtctl.h'
[C++ Error] stdafx.h(22): E2209 Unable to open include file 'afxcmn.h'
[C++ Error] stdafx.h(25): E2209 Unable to open include file ' msxml3.tlh'
[C++ Error] stdafx.h(26): E2282 Namespace name expected
[C++ Fatal Error] A Note.h(10): F1003 Error directive: include 'stdafx.h' before including this file for PCH
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
Clan ^K][L^  co-leader! www.clankil.com
dC member! www.monsterkill.org

Offline console

  • Brobdingnagian Member
  • ***
  • Posts: 4518
  • "Man, this is the way to travel," said my attorney
    • View Profile
    • tastyspleen.net
  • Rated:
Re: C/C++ programmers.. need some help.
« Reply #6 on: March 26, 2007, 07:01:55 PM »

Code: [Select]
[C++ Error] stdafx.h(15): E2209 Unable to open include file 'afxwin.h'
[C++ Error] stdafx.h(18): E2209 Unable to open include file 'afxext.h'
[C++ Error] stdafx.h(19): E2209 Unable to open include file 'afxdisp.h'
[C++ Error] stdafx.h(20): E2209 Unable to open include file 'afxdtctl.h'
[C++ Error] stdafx.h(22): E2209 Unable to open include file 'afxcmn.h'
[C++ Error] stdafx.h(25): E2209 Unable to open include file ' msxml3.tlh'
[C++ Error] stdafx.h(26): E2282 Namespace name expected
[C++ Fatal Error] A Note.h(10): F1003 Error directive: include 'stdafx.h' before including this file for PCH

Well this is a really fundamental problem.  If you don't have the MFC/Win32 development SDK (where those missing header files would be), you'll need to obtain it.  If you already have it, then your include paths aren't set up properly.


I'm using Borland 2006.. and from what I understand I need VS 2003 in order for this to compile correctly.
I will try and download VS express, but it doesn't have a debugger.. so that won't be much good :(

Ah.. yeah... I'd be surprised if non-microsoft compilers could get very far compiling MFC headers.

As far as not having a debugger.... geez I think i was programming for 10 years before I ever had source-level debugging.  Just sprinkle print statements in the code to narrow things down.  :) :)


Regards,

:afro:

  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline [N]auTiCa

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
    • Extreme Online Gaming
  • Rated:
Re: C/C++ programmers.. need some help.
« Reply #7 on: March 26, 2007, 07:08:53 PM »
I will d/l and try VS express and see if it helps any...


 Just sprinkle print statements in the code to narrow things down.  :) :)



Is that a clue to my program lol?

How is the code looking thus far?
I honestly don't believe I have to add much, only a couple lines of code to get this feature implemented, however I am unsure if what I've put in is somewhat correct.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
Clan ^K][L^  co-leader! www.clankil.com
dC member! www.monsterkill.org

Offline [BTF] Reflex

  • Loquaciously Multiloquent Member
  • ****
  • Posts: 5324
  • !
    • View Profile
  • Rated:
Re: C/C++ programmers.. need some help.
« Reply #8 on: March 27, 2007, 04:25:09 AM »





                           :blowup:
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
Sometimes I think it’s a sin when I feel like I’m winnin’ when I’m losin’ again

Offline jägermonsta

  • Brobdingnagian Member
  • ***
  • Posts: 4441
  • Bigger Than Jesus
    • View Profile
  • Rated:
Re: C/C++ programmers.. need some help.
« Reply #9 on: March 27, 2007, 04:38:59 AM »
glad I paid indians $5 to do my finals/projects in college programming classes...  :humm:
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline reaper

  • Opulent Member
  • *
  • Posts: 2872
  • Nice night for a walk, eh? - Nice night for a walk
    • View Profile
  • Rated:
Re: C/C++ programmers.. need some help.
« Reply #10 on: March 27, 2007, 07:52:35 AM »
nautica, it's a good idea to compile the source first, before adding features to the program.   you should compile your program at certain points as you create it,  it's not like you compile things once at the end, gl with that : )
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
VaeVictus "reaper is a lying sack of shit and ragequit then had, probably slugs, come alias and beat me, wasnt even the same person playing OBVIOUSLY, accuracies basicly doubled, and strategy

Offline console

  • Brobdingnagian Member
  • ***
  • Posts: 4518
  • "Man, this is the way to travel," said my attorney
    • View Profile
    • tastyspleen.net
  • Rated:
Re: C/C++ programmers.. need some help.
« Reply #11 on: March 27, 2007, 10:00:04 AM »
How is the code looking thus far?
I honestly don't believe I have to add much, only a couple lines of code to get this feature implemented, however I am unsure if what I've put in is somewhat correct.

You might need to revise your beliefs slightly before it's all said and done. :D

Currently, from what I can tell, you've added an szFilter variable that's never used; and you've overwritten the ofn.lpstrFilter field with ".txt" instead of ".xml" in the import function.

All that's going to do is mess up the XML import feature, by letting people only see .txt files to import by default, instead of .xml files.  But if you haven't changed the Load (szName) method, then presumably it will still be tring to interpret whatever file the user selects, as a .xml file to load.  (One would expect it to then gag horribly on whatever .txt file it tries to parse as .xml.)

You're going to do a lot more than add two lines...

As reaper suggests, I'd definitely recommend getting the original compling and running first before you make any changes.

When you do make changes, you are essentially going to need to make alternate, separate versions of the existing OnTraymainImportexportImport() and OnTraymainImportexportExport() methods.  Your new Import/Export methods will be similar, but will presumably need to call methods like LoadAsText() and SaveAsText() instead of the current Load() and Save().  (Unless you're SURE the existing Load() and Save() methods somehow magically already handle both XML and TXT formats... which would be weird.)

Did the teacher already provide LoadAsText() and SaveAsText() methods for you?  Or are you supposed to write them yourself?  This seems like potentially a fairly advanced assignment, for you to be thinking you only needed to change a couple lines?  :eyecrazy:


Regards,

quadz
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline [N]auTiCa

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
    • Extreme Online Gaming
  • Rated:
Re: C/C++ programmers.. need some help.
« Reply #12 on: March 27, 2007, 12:28:59 PM »
Well the teacher didn't provide anything to go by. I am to take this open source program and implement this feature into it.

The problem with compiling is that VS does not compile this program correctly.. at least VS 2005 does not. I cannot get a hold of the 2003 version which is suppose to work with this program. Currently I'm just using Borland and I understand that it doesn't work either, but I can at least try to add whatever is needed and just submit my code if I believe it is correct.

quadz, I'm not sure if you d/l'ed the program, but it runs in the task tray area and when you right click the program it has the feature to import/export.. and with the import/export you can only do .xml, however I'm suppose to add the ability to do .txt in the dialogue box that comes up once you select to import. I will add the methods you suggested and see what I can come up with.

I will mess around with it a bit more tonight, for now I have class. This is due tomorrow so I will most likely try and get whatever I can as final code up by tonight and have you take a look at it if you don't mind :)
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
Clan ^K][L^  co-leader! www.clankil.com
dC member! www.monsterkill.org

Offline console

  • Brobdingnagian Member
  • ***
  • Posts: 4518
  • "Man, this is the way to travel," said my attorney
    • View Profile
    • tastyspleen.net
  • Rated:
Re: C/C++ programmers.. need some help.
« Reply #13 on: March 27, 2007, 01:23:06 PM »
I would expect you would have a lot better luck getting it to compile with VS 2005, than with Borland.

VS 2005 is going to be able to compile most any VS 2003 MFC application, if it's set up right.  Microsoft could not get away with releasing a compiler update that completely failed to compile millions of old programs, I'm pretty sure.  (In other words, there may be some issues with compiling in VS 2005 but they should be fairly superficial.)


quadz, I'm not sure if you d/l'ed the program, but it runs in the task tray area and when you right click the program it has the feature to import/export.. and with the import/export you can only do .xml, however I'm suppose to add the ability to do .txt in the dialogue box that comes up once you select to import. I will add the methods you suggested and see what I can come up with.

Well--no offence intended--but it's sounding like you have only the most vague idea of what you're supposed to do or how to do it.  So I would recommend against just "adding the methods I suggested", unless you know they are pertinent and appropriate to your solution.  :shifteyes:

OK, I downloaded the source and compiled it.  (With VS 2003.)

How long ago did you get this assignment that's due tomorrow?  What led you to believe you only need to add a ".txt" filter to the open/save file dialog to make the program import/export in a text format instead of XML?

Have you looked at the CMainFrame::Save() and CMainFrame::Load() methods?  Do you think they will start saving and loading in a text format, if you simply pass them a filename that ends in ".txt"?

You MIGHT be able to finish this by tomorrow... But you are going to have to understand how Save() and Load() work, and how the routines in Xml.cpp work that are used by Save() and Load()... Because you are going to need to write plain text equivalents for all that.  I would get started ASAP.  :P

BTW, what errors do you get when you try to compile the project with VS 2005?


Regards,

:dohdohdoh:


« Last Edit: March 27, 2007, 01:25:00 PM by console »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline [N]auTiCa

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
    • Extreme Online Gaming
  • Rated:
Re: C/C++ programmers.. need some help.
« Reply #14 on: March 27, 2007, 06:25:45 PM »
I would expect you would have a lot better luck getting it to compile with VS 2005, than with Borland.

Yeah I figured that.. I'm about to re-install VS 2005 back onto my machine and just use that.

Well--no offence intended--but it's sounding like you have only the most vague idea of what you're supposed to do or how to do it.  So I would recommend against just "adding the methods I suggested", unless you know they are pertinent and appropriate to your solution.  :shifteyes:

See thats the problem.. I'm not a programmer and don't foresee myself as being a programmer, however this class is required for my degree for which I would like to pursue a career in networking, although I know programming is a part of everything generally computer related.

OK, I downloaded the source and compiled it.  (With VS 2003.)

How long ago did you get this assignment that's due tomorrow?  What led you to believe you only need to add a ".txt" filter to the open/save file dialog to make the program import/export in a text format instead of XML?

This was assigned two weeks ago. The reason I'm here the night before it's due is because the first week of the assignment it was midterms week, the following week after that was spring break in which I was away for that whole week.. so here I am :)

As for having to add a ".txt" filter to the open/save dialog, it's what the instructor wants. It really has no meaningful purpose I would assume, he just wants that particular feature implemented.

Have you looked at the CMainFrame::Save() and CMainFrame::Load() methods?  Do you think they will start saving and loading in a text format, if you simply pass them a filename that ends in ".txt"?

Not sure.. I'm about to look at that right now, I just got home from class and I'll be up 'til late tonight and working on this early tomorrow before I have to submit tomorrow afternoon.

You MIGHT be able to finish this by tomorrow... But you are going to have to understand how Save() and Load() work, and how the routines in Xml.cpp work that are used by Save() and Load()... Because you are going to need to write plain text equivalents for all that.  I would get started ASAP.  :P

BTW, what errors do you get when you try to compile the project with VS 2005?

I know I know... lol... see this is why I'm posting here for help 'cause I honestly don't know much about programming. Ask me questions pertaining to networking.. pfft :P Also the errors I'm getting is that for some reason it's not loading the headers that are declared. I can't get ahold of VS 2003. I have it going on torrents at a measly 25kbps. I'll continue working on this throughout the night, but I know that no matter if it's right or wrong, the compiler won't do tell me much.

btw.. I really do appreciate you helping me.. always good to have an old friend come to the rescue :)
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
Clan ^K][L^  co-leader! www.clankil.com
dC member! www.monsterkill.org

 

El Box de Shoutamente

Last 10 Shouts:

 

Costigan_Q2

November 11, 2024, 06:41:06 AM
"Stay cozy folks.

Everything is gonna be fine."

There'll be no excuses for having TDS after January 20th, there'll be no excuses AT ALL!!!
 

|iR|Focalor

November 06, 2024, 03:28:50 AM
 

RailWolf

November 05, 2024, 03:13:44 PM
Nice :)

Tom Servo

November 04, 2024, 05:05:24 PM
The Joe Rogan Experience episode 223 that dropped a couple hours ago with Musk, they're talking about Quake lol.
 

Costigan_Q2

November 04, 2024, 03:37:55 PM
Stay cozy folks.

Everything is gonna be fine.
 

|iR|Focalor

October 31, 2024, 08:56:37 PM
 

Costigan_Q2

October 17, 2024, 06:31:53 PM
Not activated your account yet?

Activate it now! join in the fun!

Tom Servo

October 11, 2024, 03:35:36 PM
HAHAHAHAHAHA
 

|iR|Focalor

October 10, 2024, 12:19:41 PM
I don't worship the devil. Jesus is Lord, friend. He died for your sins. He will forgive you if you just ask.
 

rikwad

October 09, 2024, 07:57:21 PM
Sorry, I couldn't resist my inner asshole.

Show 50 latest
Welcome, Guest. Please login or register.
November 26, 2024, 01:11:41 PM

Login with username, password and session length