Search:

Type: Posts; User: Calef13

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    8,679

    why is strncpy segfaulting here?

    It's ok my question is already answered here: http://cboard.cprogramming.com/showthread.php?t=110612 in post #5. Sorry for the repost

    Hi,

    I am writing some code to parse a port range given as a...
  2. Thread: argv weirdness

    by Calef13
    Replies
    7
    Views
    1,672

    ok thanks for all the replies everyone, I...

    ok thanks for all the replies everyone, I understand now, I should have been using strlen() for one. Just for completeness, the code is below.



    #include<stdio.h>
    #include<string.h>

    int...
  3. Thread: argv weirdness

    by Calef13
    Replies
    7
    Views
    1,672

    argv weirdness[SOLVED]

    Hi,

    I'm experimenting with argv to learn more about how it works for a program I'm writing. I'm working with the code below:



    #include<stdio.h>

    int main( int argc, char **argv)
    {
  4. Thread: Quick question

    by Calef13
    Replies
    6
    Views
    927

    At first glance, you aren't updating C after each...

    At first glance, you aren't updating C after each switch statement. For example, you enter 'A', and you add a number to the list, then the program breaks and loops back around to the A case again....
  5. Thread: Little sniffer

    by Calef13
    Replies
    8
    Views
    4,000

    Well I tried compiling and running it, but it...

    Well I tried compiling and running it, but it wasn't happening. I got no packets at all. I know nothing about raw sockets, but I can't see how you can be reading from anything anyway, you read an ip...
  6. Replies
    4
    Views
    1,208

    So would the following code be ok? ...

    So would the following code be ok?



    #include<stdio.h>
    #include<stdlib.h>

    void doStuff( void *sock );

    int main()
  7. Thread: Little sniffer

    by Calef13
    Replies
    8
    Views
    4,000

    Sorry I got that link wrong, it's...

    Sorry I got that link wrong, it's www.security-freak.net. My bad.
  8. Replies
    4
    Views
    1,208

    sorry excuse my laziness, I realised I just...

    sorry excuse my laziness, I realised I just needed a few printf statements to find out what's happening. So it uses pointers with whatever value t has at that point, which is necessary because that's...
  9. Thread: Little sniffer

    by Calef13
    Replies
    8
    Views
    4,000

    if you are interested in learning more about...

    if you are interested in learning more about socket programming, especially raw sockets, www.securityfreak.net is a really excellent site for that stuff.
  10. Replies
    4
    Views
    1,208

    passing pointers

    Hi,

    I'm looking up pthreads and it's going ok, but I'm getting a little confused with the (void *) casting, so I was hoping sombody could explain what exactly the variable t is when it is passed...
  11. Here is the header file and some of the source...

    Here is the header file and some of the source file, if you want to see more code just ask.



    #ifndef KETHER_H
    #define KETHER_H
    #include <QTcpSocket>
    #include <QTcpServer>
    #include <QString>...
  12. I moved it into the source file but then I get...

    I moved it into the source file but then I get these errors



    kether.cpp: In constructor ‘Kether::Kether(QWidget*)’:
    kether.cpp:14: error: invalid use of qualified-name ‘Kether::lookup’...
  13. Yeah sorry forgot those lines. I added them but...

    Yeah sorry forgot those lines. I added them but then I get errors during linking as far as I can tell.



    main.o:(.rodata+0x0): multiple definition of `Kether::morse'
    kether.o:(.rodata+0x0):...
  14. Well, your test example above works fine for me....

    Well, your test example above works fine for me. But when I declare the two arrays outside the class like yours I still get errors, and member functions apparently can't see them



    In file...
  15. Thanks for the replies. I'm still getting errors...

    Thanks for the replies. I'm still getting errors compiling after making the changes however



    kether.cpp: In constructor ‘Kether::Kether(QWidget*)’:
    kether.cpp:8: error: uninitialized member...
  16. Can you initialize arrays in the class declaration

    Hi,

    I am writing a simple chat program using Qt4. I decided to convert all text which is sent over the network into morse code as a side task to better understand string manipulation. I am having...
  17. Replies
    3
    Views
    5,529

    I was always under the impression that most...

    I was always under the impression that most packets had it set to 256 as it's only used to stop infinite routing loops which are relatively rare afaik. I don't think it has much practical use in...
  18. Replies
    3
    Views
    3,760

    ok I just tried it with QTextStream and it...

    ok I just tried it with QTextStream and it worked! Thank you so much, you have no idea how long I have been fighting with this, seriously thanks a lot.
  19. Replies
    3
    Views
    3,760

    Well, the examples simply read into a qstring and...

    Well, the examples simply read into a qstring and they work fine, but you are right the datastream is for binary writing, I want to try this but what type of variable should I use, will an arry work...
  20. Replies
    2
    Views
    4,153

    flush the arp cache on the computer you are using...

    flush the arp cache on the computer you are using and then ping the computer, capture the request with wireshark or tcpdump. If you want to write a program then check out www.security-freak.net which...
  21. Replies
    3
    Views
    3,760

    can't read from qt4 tcpSocket

    Hi,

    I am using Qt4 to develop a simple chat client for school. I have already asked this question on qtforums.org but never got a response, I am hoping that someone here has some knowledge of Qt...
  22. Replies
    4
    Views
    3,473

    It's me who is writing/designing this program....

    It's me who is writing/designing this program. Thanks for the links, I'll have a look. I thought there was a set method to writing designs but choosing your own is great and should be easier.
  23. Replies
    4
    Views
    3,473

    pseudocode for multiple source files

    Hi,

    I need to write the deign for a program which I am writing for a school project. I am using qt4 for the gui so there will be around 3-4 source files. This is my first time writing a design for...
  24. Replies
    2
    Views
    3,523

    winsock linking problems

    Hi,

    I am trying to get my head around windows sockets, however they are proving to be a lot more complex than in linux. So I decided to see just how much I would need to modify a simple echo...
  25. Replies
    3
    Views
    1,981

    Actually after a little research I realise that...

    Actually after a little research I realise that forking is really not done on windows, I'm better off with multithreading.

    Calef13
Results 1 to 25 of 72
Page 1 of 3 1 2 3