User Profile

Collapse

Profile Sidebar

Collapse
blunt
blunt
Last Activity: Jan 20 '09, 11:17 AM
Joined: Nov 27 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • :d

    thanx everyone for all your help
    the program is now working here is it is, it takes a config file for a preconfigured Colubrius Wireless Access Point and then creates up to 254 config files (limit set by ip address size). the config files set the access points to sequential IP addresses and also sequential remote access ports. You still have to then put them on the WAPs but it speeds things up if you don't own a multi access...
    See more | Go to post

    Leave a comment:


  • blunt
    replied to need help converting pointer contents into string
    in C
    new issue trying to skip ahead 2 lines:
    http://bytes.com/answers/c/856799-an...ng#post3437773...
    See more | Go to post

    Leave a comment:


  • Any ideas on how to skip ahead 2 lines in the file your reading from?

    right the program is nearly complete just a couple of little tweaks and i should have it. The purpose of this program is to write config files for colubrius wireless access points but it's falling over in this section of code:

    while(line!=32) {
    fgets(c, 1, sourceFile);
    strncpy (compare,c,1);
    if (compare[0]=='\n'){
    line++;
    }
    }

    this section is...
    See more | Go to post

  • blunt
    replied to need help converting pointer contents into string
    in C
    ahhh

    sorry for sounding like a pirate, of course knew i was being a retard and as the variable is an integer not a char it assumed that i ment it to display the ascii reresentation. thanks for that and thanks for the previous solution.
    See more | Go to post

    Leave a comment:


  • blunt
    replied to need help converting pointer contents into string
    in C
    for the above

    it should be putting the line number as an integer
    See more | Go to post

    Leave a comment:


  • blunt
    replied to need help converting pointer contents into string
    in C
    Noooo!!!!

    was going so well but it is inserting the ascii character represented by the hexidecimal value of the variable line: fputc(line, destinationFile );
    this doesn't make sense to. i know it's going to be really obvious but it's stumped me once again.
    See more | Go to post

    Leave a comment:


  • blunt
    replied to need help converting pointer contents into string
    in C
    ah ok single not double quotes

    that's stopped the compilation errors. i tested it and \r didn't come up with anything so did it again with \n and it's working now :D
    right now just gonna use this to put line numbers in the file so i can see which lines i need to change then change the data in it and will put the code back up here in case there's anyone interested in creating config files for Colubrius access points then they're...
    See more | Go to post

    Leave a comment:


  • blunt
    replied to need help converting pointer contents into string
    in C
    yay that's sorted out that issue but....

    ok that has resolved the issue of making a copy of the contents of pointer c so i can compare them but now i still have the issue with trying to detect newline/carriage return characters: if (compare[i]=="\r"){
    i am getting the error: warning: comparison between pointer and integer
    i've tried it with and without quotes and with a single =.
    i can't find the code...
    See more | Go to post

    Leave a comment:


  • blunt
    replied to need help converting pointer contents into string
    in C
    cheerz will give it a go

    i'll try that in a minute i have realised that i have done a really silly thing there: it should be compare=c; as compare is the new variable that i am trying to fill with the contents of the pointer c. will try it tho and let you know how i get on. thanks again for the advise.
    See more | Go to post

    Leave a comment:


  • blunt
    started a topic converting pointers cointents into a string
    in C

    converting pointers cointents into a string

    trying to write a program to write the configuration files for a load of wireless access points. i've never been a good programmer and haven't done any for nearly a decade so have obviously made some mistakes, i'm using cygwin on a windows pc and it seems that some functions cause stack overflows so am using fgets instead of fgetc (don't know y it solved the problem but that part is working).
    my problem now is that i am reading strings a...
    See more | Go to post

  • blunt
    started a topic need help converting pointer contents into string
    in C

    need help converting pointer contents into string

    trying to write a program to write the configuration files for a load of wireless access points. i've never been a good programmer and haven't done any for nearly a decade so have obviously made some mistakes, i'm using cygwin on a windows pc and it seems that some functions cause stack overflows so am using fgets instead of fgetc (don't know y it solved the problem but that part is working).
    my problem now is that i am reading strings a...
    See more | Go to post
No activity results to display
Show More
Working...