Is there a way (other than using extern) to share variables between multiple source files?  extern is fine but it just seems a little tacky since everything has to be global.  I really don't want to use system calls to use shared memory, pipes, etc.  Anyone have ideas?
200170
The best way is to use a header file, call it whatever you want such as "global.h". In there \nyou declare a class with a public static data member. This is always a declaration and does not require an extern keyword. Then in one file you define the static variable. You can use that variable in any number of files. Here's an example:\n\nFile "global.h":\nclass Global\n{\npublic:\nstatic int var;\n};\n\nFile "global.cpp":\n\nint Global::var = 42;\n\nAn any other file use Global::var to refer to the shared variable.\n\nSometimes this doesn't work with dynamically loaded libraries. In that case, what you do is declare a static function which returns a reference to a static variable. Whenever the variable needs to be accessed, you call the static function.
97487
Check out the following thread (i.e., including the replies / followups)\n\nhttp://gcc.gnu.org/ml/gcc-help/2003-01/msg00058.html
65318
I use Mozilla, so open separate tabs. CTRL+T, or it's under the "File" menu. Also, you can right-click on a hyperlink and one of the options will be "Open in a new tab". Obviously, if you want to share information between separate tabs, you can copy and paste. Hope this helps.
446107
You are talking about mixing Windows and DOS?  If this is possible, you could use std::cout to print to the terminal window.  Somehow I doubt it is though.\n\nIf you are giving the command in a terminal and want the output, pipe it to a file then read the file, e.g.\n\napp command >output.txt\n\nA command is information you give to a computer that it is to do something.
52120
if sending many files, it may be inconvinient to rename one by one, zip them using winzip or similiar, than rename the zip, ask the people on the other side to rename the zip back.\n\nNB: on WinXP, file extention is default to be hidden, try finsing tutorial for showing it, I'm too lazy to write it
188665
#include <stdio.h>\n#include <stdlib.h>\n\nint\nmain(int argc, char* argv[])\n{\n  int count = argc>1 ? atoi(argv[1]) : 10;\n  FILE *f = fopen("numfile", "w+");\n  if (!f)\n    perror("fopen"), exit(-1);\n  for (int i=0; i<count; i++)\n    fprintf(f, "%d&#92;n", rand());\n  fclose(f);\n  return 0;\n}
84627
Global variables are self contained in each workbook.  If there are more than one workbook open at the same time then you can pass the variable through.\n\nat the top of your code type:\n\nPublic Const myString = "yourdataVariable"\n   (if your variable is constant)\n\nDim myString as String\n   (if your variable changes)\n\nafter you tyep it in and hit enter there will appear a line break. this will show that all var's above the line are global\n\nIf worse comes to worse you can always open the workbook were you want to variable passed and put it in a cell and then use another variable to pick up its value
188077
Here's how to share folders, http://www.microsoft.com/windowsxp/using/networking/getstarted/shareresources.mspx, connect the two computers together using a LAN cable and file sharing/folder sharing SHOULD work.  What you want to do and what Windows wants to do may be two different things, I've successfully done this one many computers and some simply refused to acknowledge the connection.\n\nThere is an alternative, you can try Beamfile, http://www.beamfile.com/
220595
I am not sure what program you tried, but here is one that should work on borlands compiler.\n\n#include <iostream>\n\nint main() {\n\n    std::cout<<"Hello, world!&#92;n";\n}\n\nI have included the 'std::' namespace in front of the cout.\n\n<Edit>\nAre you running the program from the command line, or just clicking on the exe?\nIf clicking on the exe, a command line will pop up, then disappear after displaying hello world.\nYou need to run it from the command line.
601381
.net applications are compiled to an intermediate language, just like Java, and then compiled again at run-time. The first compile step guarantees that the applications will be in a common language. The second compilation is used to gain speed with "real" machine code against "virtual" machine.\n\nThe libraries used in .net are already compiled to that intermediate language and since every .net language will be compiled to it, is possible for them to share the libraries. It's also possible to write parts of a single application using different languages.
183522
You may use the function : \n1) system() \n2) spawnl() or it varients\n3) execl() or its varients \n\nfor the path argument simply pass the path of the .exe file that you with to run in double quotes and use double backslash instead of the single backslash. \n\nBefore you run the program, \nyou have to make sure that the path variable has been set to the directory where your progam resides. \n\nwrite a while loop with an switch-case and escape condition. Within each case call the appropriate program (run the .exe file) using spawnl or execl. These functions run the programs as child processes. But remember, if you do not set the path variable, nothing will work properly.  Good luck!
154237
#: 9534 S3/Languages\n    16-Feb-91  17:33:10\nSb: #the **p syntax in 'C'\nFm: SCOTT HOWELL 70270,641\nTo: all\n\nI have seen this syntax infrequently in college 'C' text and in source code,\nbut I have yet found a good explaination.\n\n                It is in reference to pointers and I beleieve it is called\n'double indirection'??? the syntax is\n\n\n        char **p = & dummy or      char **match(p,name) What does the **\nactually say\n\nThere are 2 Replies.\n\n#: 9538 S3/Languages\n    17-Feb-91  00:35:53\nSb: #9534-the **p syntax in 'C'\nFm: Sandy Tipper 72060,76\nTo: SCOTT HOWELL 70270,641 (X)\n\nActually, it means two different but related things, depending on where\nyou find it.  In both of your examples, it was in a declaration\nstatement, (the first was complicated bu the fact that it included\nan initialization, and the second was the declaration of a function).\nthe simplest example of this type is :   char **p;  This is a declaration\nof the variable p.  The first (RIGHTmost) asterisk means that p is a \npointer.  Fair enough, but a pointer to what?  The second asterisk tells\nus that the what is a pointer itself.  So p is a pointer to a pointer.\nBut what is the pointer that p is pointing to pointing at? A char. So\np is a pointer to a pointer to char.  In your example, the initialization\nis of p, setting up p to contain the address of a variable (p points to\nthat variable).  That variable had better be a pointer to char.\nLater in the code, after the definitions and declarations have been all\ndone, the asterisk has a different meaning altogether: instead of explaining\nwhat the variable being declared is, it is an operator, "doing" something\nto the expression it is operating on.  If i is an int, and p is a pointer to\nint, and pp is a pointer to pointer to int, then follow this:\n  i = 4;\n  p = &i;\n  pp = &p;\n Question: what is **pp ?  First, read it as *(*pp)  So pp is pointing to\np, so *pp evaluates as equivalent to p.  And p is pointing to i, so *p\nevaluates as equivalent to i.  So **pp is equivalent to i.  So **pp is 4.\nSee?\nSandy\n\n#: 9539 S3/Languages\n    17-Feb-91  11:44:39\nSb: #9534-the **p syntax in 'C'\nFm: Pete Lyall 76703,4230\nTo: SCOTT HOWELL 70270,641 (X)\n\nScott -\n\n char **p = &dummy;\n\nSays: p is a pointer to a pointer that points to a char type. The &dummy says\nassign the address of dummy (i.e. a pointer) to that slot. Typically double\nindirects are used with arrays of pointer, like **argv for instance.\n\nThe 'char **match(p,name) says that match is a function that returns a pointer\nto a pointer to a type of char.\n\nPete\n\n#: 9535 S10/OS9/6809 (CoCo)\n    16-Feb-91  21:28:45\nSb: #9528-#dir file help\nFm: Everett Chimbidis 76370,1366\nTo: Pete Lyall 76703,4230 (X)\n\nNot all dirs does this happen to!! only 2 out of 32 dirs!! Can you look at this\nfor me?\n\nThere are 2 Replies.\n\n#: 9537 S10/OS9/6809 (CoCo)\n    16-Feb-91  22:05:21\nSb: #9535-#dir file help\nFm: Kevin Darling 76703,4227\nTo: Everett Chimbidis 76370,1366 (X)\n\nEv - email me your code again (and be ****sure**** you send it as text)... I\nwas going to look at it today, but the power dropped at the house and I lost it\noff my ramdisk.\n\nHave those dirs been sorted or anything, btw?  What exactly is happening? Just\ngiving the wrong dates and file sizes, or ?\n\nThere is 1 Reply.\n\n#: 9567 S10/OS9/6809 (CoCo)\n    18-Feb-91  23:18:34\nSb: #9537-#dir file help\nFm: Everett Chimbidis 76370,1366\nTo: Kevin Darling 76703,4227 (X)\n\nonly wrong on 2 out of 26 dirs!! All is wrong dates file size (name is ok)\nSending it to you!\n\nThere is 1 Reply.\n\n#: 9571 S10/OS9/6809 (CoCo)\n    20-Feb-91  08:50:45\nSb: #9567-#dir file help\nFm: Kevin Darling 76703,4227\nTo: Everett Chimbidis 76370,1366 (X)\n\nEv - your program seemed to work okay here.\n\nAre those 2 bad dirs okay?  That is, "dir e" and all the files work there?\n\nHave you checked to see ju
595542
On UNIX style systems you can execute commands with the system call, for example\n\nsystem("cp pathname1 pathname2")\n\nLikewise on Windows but with copy instead of cp.\n\nhttp://www.die.net/doc/linux/man/man3/system.3.html\n\n\nWindows has a CopyFile function which can be called from C.\n\nhttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/copyfile.asp
70698
It's been a while since I did anything in Java but I'm fairly certain it's just this:\n\nfile.add(new MenuItem("Print"));\nfile.add(new MenuItem("-"));\nfile.add(new MenuItem("Exit"));\n\n..give it a shot.
212811
Basically you'll need to open a port on each of the two processes, and send a packet between them to communicate.  Generally that will be structured as a sending/"talking" process and a "listening" process to catch the sent packet. In C, you'll need to check the library for the operating system and compiler you're using to find the appropriate functions.  Look under "low level IO", usually.
378442
In your code, you do not need "system("start etc);": system( "cd dir_you_need" ) or "chdir(dir_you_need )" will be quite right :-)\nDo not forget to\n#include "stdlib.h"\nand do not forget that your "chdir" must get as an argument either full path or directory name relative to your current directory.
472356
What a great question!\n\nYou know, I used to write batch files for everything under the sun back in the old DOS 6 / Windows 3.11 days, but somehow got away form doing so as Windows evolved -- I wasn't even sure it still supported batch files!  But a little digging turns up the fact that yes it does.  It appears that what you are after is a "script file" (which seems to do within Windows what the Batch files do within DOS), though I'm not yet sure if that denotes a truly different type of file or if it is just a different name for the same thing.\n\nAnyway, here are a few interesting looking links I found:\nhttp://www.student.oulu.fi/~vtatila/batch_tutorial.html\nhttp://labmice.techtarget.com/scripting/default.htm\nhttp://www.onesmartclick.com/programming/batch-files.html\n\nSorry I couln't be more help than that, but hopefully it gets you started in the right direction.  Thanks for asking the question, it gave me something new to go learn about!