This is my source code, what is wrong with it?
(it's written in both C and C++ for various reasons) -
#include <iostream>
-
#include <fstream>
-
#include <stdio.h>
-
#include <string.h>
-
-
using namespace std;
-
-
int main() {
-
-
char computera[10];
-
char computerb[10];
-
-
cout<<"Enter name of computer you wish to connect to: ";
-
cin>> &computerb[0], &computerb[1], &computerb[2], &computerb[3], &computerb[4], &computerb[5], &computerb[6], &computerb[7], &computerb[8], &computerb[9];
-
cin.get();
-
cout<<"Enter name of computer you are using: ";
-
cin>> &computera[0], &computera[1], &computera[2], &computera[3], &computera[4], &computera[5], &computera[6], &computera[7], &computera[8], &computera[9];
-
cin.get();
-
cout<<"Connecting to " << computerb <<"...";
-
cin.get();
-
char buff[1024] = {0};
-
char path[]= "\\\\";
-
char location[] = "\\C$\\Program Files\\NetMessage\\chat.txt";
-
strcpy( buff, path );
-
strcat( buff, computerb );
-
strcat( buff, location );
-
system("cd C:\\Program Files\\ & md NetMessage");
-
ofstream retrieve ( "C:\\Program Files\\NetMessage\\retrieve.vbs" );
-
retrieve<<"Set objFSO = CreateObject(\"Scripting.FileSystemObject\")\nSet objOutFile = objFSO.OpenTextFile(\"" << path << computerb << location <<"\", 8, True)\n\nobjOutFile.WriteLine (\"Test message!\")";
-
retrieve.close();
-
system("cd C:\\Program Files\\NetMessage & cscript retrieve.vbs");
-
system("cls");
-
char reada[100] = {0};
-
char readb[100] = {0};
-
char readc[100] = {0};
-
char readd[100] = {0};
-
char reade[100] = {0};
-
char readf[100] = {0};
-
char readg[100] = {0};
-
char readh[100] = {0};
-
char readi[100] = {0};
-
char readj[100] = {0};
-
char readk[100] = {0};
-
char readl[100] = {0};
-
char readm[100] = {0};
-
char readn[100] = {0};
-
char reado[100] = {0};
-
char readp[100] = {0};
-
char readq[100] = {0};
-
char readr[100] = {0};
-
char reads[100] = {0};
-
char readt[100] = {0};
-
while (1==1) {
-
ifstream chat ( "C:\\Program Files\\NetMessage\\chat.txt" );
-
chat>> reada >> readb >> readc >> readd >> reade >> readf >> readg >> readh >> readi >> readj >> readk >> readl >> readm >> readn >> reado >> readp >> readq >> readr >> reads >> readt;
-
cout<< computera <<": " << reada <<" " << readb <<" " << readc <<" " << readd <<" " << reade <<" " << readf <<" " << readg <<" " << readh <<" " << readi <<" " << readj <<" " << readk <<" " << readl <<" " << readm <<" " << readn <<" " << reado <<" " << readp <<" " << readq <<" " << readr <<" " << reads <<" " << readt;
-
cin.get();
-
}
-
}
-
My compiler (Dev-C++) won't compile it because it says "Permission denied. Id returned 1 exit status".
3 1218
Don't worry, problem solved.
Good... I had the same problem when I realized that I had my program still running. ;)
Lol, yeh I feel a bit silly now...
Sign in to post your reply or Sign up for a free account.
Similar topics
by: RJS |
last post by:
Hi all,
I can't get a py2exe compiled app to run with numarray (numarray-0.5.win32-
py2.2).
Also wxPythonWIN32-2.3.3.1-Py22 and ActivePython-2.2.1-222.
In the sample below, commenting out...
|
by: Club-B42 |
last post by:
i've compiled my programm using command "python setup.py py2exe >1"
python script works fine, but .exe version fails with
=====================================================================...
|
by: Paul |
last post by:
Not sure if this is the correct place to post the problem, but trying to use the HTML help workshop and trying to create the index file automatically. Anyhow I get the error below
HHC5003: Error:...
|
by: ZikO |
last post by:
Hello.
Would you like anyone of you to looke through my program, which is on this
address:
http://republika.pl/zebik/video_Stack_en.cpp
and check where I have made a mistake? I use GNU C++...
|
by: plumb and tree |
last post by:
I've been trying for days to build 64 bit python with Solaris 10 + Sun
Studio 12.
Can anyone helpl please.
This is how I tried to do build:
# ./configure --prefix=/opt/python2.4...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| | |