473,320 Members | 2,073 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Problem compiling, not sure why...

109 100+
This is my source code, what is wrong with it?
(it's written in both C and C++ for various reasons)
Expand|Select|Wrap|Line Numbers
  1. #include <iostream>
  2. #include <fstream>
  3. #include <stdio.h>
  4. #include <string.h>
  5.  
  6. using namespace std;
  7.  
  8. int main() {
  9.  
  10.     char computera[10];
  11.     char computerb[10];
  12.  
  13.     cout<<"Enter name of computer you wish to connect to: ";
  14.     cin>> &computerb[0], &computerb[1], &computerb[2], &computerb[3], &computerb[4], &computerb[5], &computerb[6], &computerb[7], &computerb[8], &computerb[9];
  15.     cin.get();
  16.     cout<<"Enter name of computer you are using: ";
  17.     cin>> &computera[0], &computera[1], &computera[2], &computera[3], &computera[4], &computera[5], &computera[6], &computera[7], &computera[8], &computera[9];
  18.     cin.get();
  19.     cout<<"Connecting to " << computerb <<"...";
  20.     cin.get();
  21.     char buff[1024] = {0};
  22.     char path[]= "\\\\";
  23.     char location[] = "\\C$\\Program Files\\NetMessage\\chat.txt";
  24.     strcpy( buff, path );
  25.     strcat( buff, computerb );
  26.     strcat( buff, location );
  27.     system("cd C:\\Program Files\\ & md NetMessage");
  28.     ofstream retrieve ( "C:\\Program Files\\NetMessage\\retrieve.vbs" );
  29.     retrieve<<"Set objFSO = CreateObject(\"Scripting.FileSystemObject\")\nSet objOutFile = objFSO.OpenTextFile(\"" << path << computerb << location <<"\", 8, True)\n\nobjOutFile.WriteLine (\"Test message!\")";
  30.     retrieve.close();
  31.     system("cd C:\\Program Files\\NetMessage & cscript retrieve.vbs");
  32.     system("cls");
  33.     char reada[100] = {0};
  34.     char readb[100] = {0};
  35.     char readc[100] = {0};
  36.     char readd[100] = {0};
  37.     char reade[100] = {0};
  38.     char readf[100] = {0};
  39.     char readg[100] = {0};
  40.     char readh[100] = {0};
  41.     char readi[100] = {0};
  42.     char readj[100] = {0};
  43.     char readk[100] = {0};
  44.     char readl[100] = {0};
  45.     char readm[100] = {0};
  46.     char readn[100] = {0};
  47.     char reado[100] = {0};
  48.     char readp[100] = {0};
  49.     char readq[100] = {0};
  50.     char readr[100] = {0};
  51.     char reads[100] = {0};
  52.     char readt[100] = {0};
  53.     while (1==1) {
  54.           ifstream chat ( "C:\\Program Files\\NetMessage\\chat.txt" );
  55.           chat>> reada >> readb >> readc >> readd >> reade >> readf >> readg >> readh >> readi >> readj >> readk >> readl >> readm >> readn >> reado >> readp >> readq >> readr >> reads >> readt;
  56.           cout<< computera <<": " << reada <<" " << readb <<" " <<  readc <<" " << readd <<" " << reade <<" " << readf <<" " << readg <<" " << readh <<" " << readi <<" " << readj <<" " << readk <<" " << readl <<" " << readm <<" " << readn <<" " << reado <<" " << readp <<" " << readq <<" " << readr <<" " << reads <<" " << readt;
  57.           cin.get();
  58.     }
  59. }
  60.  
My compiler (Dev-C++) won't compile it because it says "Permission denied. Id returned 1 exit status".
Jun 22 '07 #1
3 1218
niskin
109 100+
Don't worry, problem solved.
Jun 22 '07 #2
Good... I had the same problem when I realized that I had my program still running. ;)
Jun 23 '07 #3
niskin
109 100+
Lol, yeh I feel a bit silly now...
Jun 23 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
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...
6
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 =====================================================================...
6
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:...
2
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++...
7
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...
0
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
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...
0
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...
0
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...
0
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...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
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
0
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.