Click here to Skip to main content
15,889,879 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: "Windows (Vista) cannot find “abc.def”. Make sure you typed the name correctly and then try again." Pin
Neville Franks16-Jul-09 15:20
Neville Franks16-Jul-09 15:20 
QuestionCreating interface that can read network traffic Pin
that_dude_tj16-Jul-09 13:08
that_dude_tj16-Jul-09 13:08 
AnswerRe: Creating interface that can read network traffic Pin
Cedric Moonen16-Jul-09 20:42
Cedric Moonen16-Jul-09 20:42 
GeneralRe: Creating interface that can read network traffic Pin
that_dude_tj17-Jul-09 14:21
that_dude_tj17-Jul-09 14:21 
QuestionWIN 32 Project Pin
Member 311244716-Jul-09 9:14
Member 311244716-Jul-09 9:14 
AnswerRe: WIN 32 Project Pin
Rajesh R Subramanian16-Jul-09 9:23
professionalRajesh R Subramanian16-Jul-09 9:23 
GeneralRe: WIN 32 Project Pin
Member 311244716-Jul-09 9:40
Member 311244716-Jul-09 9:40 
GeneralRe: WIN 32 Project Pin
Member 311244716-Jul-09 9:43
Member 311244716-Jul-09 9:43 
like i want to get output for this code:

#include <LEDA/graph/graph.h>

using namespace leda;

int main()
{
graph G; //define directed graph G

node center=G.new_node(); //create new node "center" of G

int i;
for (i=0;i<100;i++) {
node v=G.new_node(); //create new node v of G
G.new_edge(center,v); //create new edge of G
//with source center and target v
}

edge e;
forall_edges(e,G) { //iterate over all edges e of G
node source=G.source(e); //compute source of e
node target=G.target(e); //compute target of e

std::cout << "edge ";
G.print_edge(e); //print edge
std::cout << " has source ";
G.print_node(source); //print source
std::cout << " and target ";
G.print_node(target); //print target
std::cout << std::endl;
}

return 0;
}




and the following was the .cpp file i added to the source code folder at the time of installation

#include <LEDA/graphics/graphwin.h>
#include <LEDA/system/file.h>
#include <LEDA/graphics/bitmaps/button32.h>




#if defined(LEDA_NAMESPACE)
using namespace leda;
#endif


#if defined(WINMAIN)

int main() {
int argc;
char** argv;
get_command_line(argc,argv);

#else

int main(int argc, char** argv) {
GraphWin gw1;

int menu1 = gw1.add_menu("Routing Game Type");
gw1.add_menu("atomic",menu1);
gw1.add_menu("non-atomic",menu1);

//gw1.add_separator(menu1);

gw1.display(); gw1.edit();

return 0;


#endif

string frame_label("Leda Graph Editor (GraphWin %.1f)",
GraphWin::version());

GraphWin gw(frame_label);

window& W = gw.get_window();


gw.display(400,window::center);

W.set_icon_label("GraphWin");

W.set_cursor(XC_watch);

string home_dir = get_home_directory();

home_dir = home_dir.replace_all("\\","/");

string rc_file = home_dir + "/.graphwinrc";

if (is_file(rc_file))
{ gw.message("Loading Options from\\blue " + rc_file);
leda_wait(1.2);
gw.read_defaults();
}
else
{ gw.message("No\\blue " + rc_file + "\\black ~(using built-in defaults).");

leda_wait(1.8);
}

gw.message("");


if (argc > 1)
{ string fname = argv[1];
string gname;
if (fname.tail(4) == ".gml")
{ gname = fname.del(".gml");
int err = gw.read_gml(fname);
if (err) gw.acknowledge("Error Reading GML-File", fname);
}
else
if (fname.tail(7) == ".dimacs")
{ gname = fname.del(".dimacs");
int err = gw.read_dimacs(fname);
if (err) gw.acknowledge("Error Reading Dimacs File", fname);
}
else
{ gname = fname.del(".gw");
int err = gw.read_gw(fname);
if (err && err < 5) gw.acknowledge("Error Reading GW-File", fname);
}
gw.set_graphname(gname);
}


int but = 0;

//bool save_defaults = false;

int def_choice = 0;

W.set_cursor();

while (but == 0)
{
gw.edit();

panel P;
P.text_item("");
P.text_item("\\bf\\blue Exit GraphWin");
P.choice_item("Options in ~/.graphwinrc",def_choice,"keep","write","reset");

if (gw.unsaved_changes())
{ P.text_item("\\bf Graph not written since last change !\\n");
P.button("save gw",3);
P.button("save gml",4);
}

P.button("cancel", 0);
P.button("exit",1);
P.buttons_per_line(4);

but = gw.open_panel(P);

if (but == 3) gw_save_handler(gw);
if (but == 4) gw_save_gml_handler(gw);

if (but != 1 && gw.unsaved_changes()) but = 0;
}

if (def_choice != 0)
{ if (def_choice == 2) gw.reset_defaults();
gw.save_defaults();

}

return 0;

}
GeneralRe: WIN 32 Project [modified] Pin
Stuart Dootson16-Jul-09 9:50
professionalStuart Dootson16-Jul-09 9:50 
AnswerRe: WIN 32 Project Pin
Stuart Dootson16-Jul-09 9:46
professionalStuart Dootson16-Jul-09 9:46 
QuestionConverting very old VC++ to VS2005 and MSXML Pin
gartnerj16-Jul-09 6:55
gartnerj16-Jul-09 6:55 
AnswerRe: Converting very old VC++ to VS2005 and MSXML Pin
Stuart Dootson16-Jul-09 9:39
professionalStuart Dootson16-Jul-09 9:39 
GeneralRe: Converting very old VC++ to VS2005 and MSXML Pin
gartnerj16-Jul-09 9:49
gartnerj16-Jul-09 9:49 
GeneralRe: Converting very old VC++ to VS2005 and MSXML Pin
Stuart Dootson16-Jul-09 9:52
professionalStuart Dootson16-Jul-09 9:52 
GeneralRe: Converting very old VC++ to VS2005 and MSXML Pin
gartnerj16-Jul-09 10:10
gartnerj16-Jul-09 10:10 
GeneralRe: Converting very old VC++ to VS2005 and MSXML Pin
Randor 16-Jul-09 10:24
professional Randor 16-Jul-09 10:24 
GeneralRe: Converting very old VC++ to VS2005 and MSXML Pin
gartnerj16-Jul-09 10:39
gartnerj16-Jul-09 10:39 
GeneralRe: Converting very old VC++ to VS2005 and MSXML Pin
gartnerj16-Jul-09 10:46
gartnerj16-Jul-09 10:46 
GeneralRe: Converting very old VC++ to VS2005 and MSXML Pin
Randor 16-Jul-09 10:50
professional Randor 16-Jul-09 10:50 
GeneralRe: Converting very old VC++ to VS2005 and MSXML Pin
Stuart Dootson16-Jul-09 13:22
professionalStuart Dootson16-Jul-09 13:22 
GeneralRe: Converting very old VC++ to VS2005 and MSXML Pin
gartnerj17-Jul-09 3:49
gartnerj17-Jul-09 3:49 
GeneralRe: Converting very old VC++ to VS2005 and MSXML Pin
Stuart Dootson16-Jul-09 13:24
professionalStuart Dootson16-Jul-09 13:24 
GeneralRe: Converting very old VC++ to VS2005 and MSXML Pin
gartnerj17-Jul-09 3:50
gartnerj17-Jul-09 3:50 
GeneralRe: Converting very old VC++ to VS2005 and MSXML Pin
gartnerj17-Jul-09 10:53
gartnerj17-Jul-09 10:53 
Questioncall functions of a win32 dll from a ASP.Net Pin
ashwath197916-Jul-09 6:40
ashwath197916-Jul-09 6:40 

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.