Thread: Help with some older code!

  1. #1
    Registered User
    Join Date
    Jun 2018
    Posts
    6

    Help with some older code!

    Hello everyone!

    I am working on a project to increase a file size and some dos window size parameters and need assistance (also I am very rusty at coding so please be patient!)

    I am using Turbo C++ to compile as that is what the original code was written in. When I go to compile, I am getting some errors. Mostly being in regards to "Declaration is not allowed here"

    Here is the code it is referencing:

    /* edit jobdata */


    int edit_rbt(bndrdata,jheadr,jdata)
    char *bndrdata,*jheadr,*jdata;
    {
    char ch;
    char fname[100];4
    char jbname[100];
    char bndrname[100];
    char fname_buf[100];
    char fnameext[100];
    char *msg;
    int i;



    Please let me know what other information you need!

    Thanks!!!

    Also here is the actual page I am working with

    Help with some older code!-2018-06-22_1234-png

  2. #2
    Registered User
    Join Date
    Dec 2017
    Posts
    1,154
    You have an extraneous 4 at the end of the fname declaration!
    The errors of great men are venerable because they are more fruitful than the truths of little men. - Nietzsche

  3. #3
    Registered User
    Join Date
    Jun 2018
    Posts
    6
    Quote Originally Posted by john.c View Post
    You have an extraneous 4 at the end of the fname declaration!

    getting rid of that fixed it!

    Thanks!!!!!!!!!!!!!!

  4. #4
    Registered User
    Join Date
    Jun 2018
    Posts
    6
    I am getting another issue

    This is the error: Suspicious Pointer Conversion

    Code:

    &xyzbuf[0][0],&edatabuf[0][0],&bpno);

    Help with some older code!-2018-06-22_1518-png

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    38,741
    We would need to see the whole code, or at least enough of the code to see the declarations of
    - &xyzbuf[0][0],&edatabuf[0][0],&bpno);
    - the context in which you're trying to use them.

    Peephole pictures of your code just doesn't cut it.

    TurboC++ is obsolete (has been since about 1990).
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  6. #6
    Registered User
    Join Date
    Jun 2018
    Posts
    6
    Quote Originally Posted by Salem View Post
    We would need to see the whole code, or at least enough of the code to see the declarations of
    - &xyzbuf[0][0],&edatabuf[0][0],&bpno);
    - the context in which you're trying to use them.

    Peephole pictures of your code just doesn't cut it.

    TurboC++ is obsolete (has been since about 1990).


    What would be the best way here to add all the code...sorry about the peep hole :/

    The project I am working on is old AF also. If you have a recommendation on a newer compiler that would work with my includes

    #include <conio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <math.h>

    I would be happy to use it

    Thanks for the help!

  7. #7
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    38,741
    Are you being paid to play in the mud?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  8. #8
    Registered User
    Join Date
    Jun 2018
    Posts
    6
    really? no.

  9. #9
    Registered User
    Join Date
    Jun 2018
    Posts
    6
    Quote Originally Posted by Salem View Post
    Are you being paid to play in the mud?
    great job. hope this little quip makes you feel so much better about your life. f off.

  10. #10
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    38,741
    Not really, but hey it's your life being wasted on obsolete stuff.

    Hell, you haven't even managed to post proper code yet.

    Feel free to start a new topic if you feel like presenting useful information instead of pictures and whining.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. An older post
    By zolfaghar in forum C Programming
    Replies: 2
    Last Post: 05-31-2016, 05:41 AM
  2. older posts
    By eloy203 in forum General Discussions
    Replies: 2
    Last Post: 01-31-2015, 10:59 AM
  3. Older versions of linux
    By überfuzz in forum Linux Programming
    Replies: 2
    Last Post: 01-27-2014, 06:50 AM
  4. does the mind change as you get older?
    By Anddos in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 12-12-2005, 12:10 PM

Tags for this Thread