Search:

Type: Posts; User: bertazoid

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    1,586

    pointer as function argument

    Hi, its been a long time since I've done any C, and I've forgotten how to use a pointer in a function declaration. For example I want to declare a function with two arguments, an integer, and a...
  2. Replies
    8
    Views
    20,108

    Thanks for all the replies. Basically at the...

    Thanks for all the replies. Basically at the computer side, I need to sent and recieve data from/to a radio transceiver, with a 4 wire SPI interface. Unfortunately, while RS232 would be easier to...
  3. Replies
    8
    Views
    20,108

    Tx/Rx from/to USB port?

    Hi, I am designing a device which I'd like to control from the USB port. I'll use a simple command prompt program in C. Where do I get started with transmitting and receiving data from/to the USB...
  4. Replies
    1
    Views
    1,533

    Extending wireless range?

    Hi, I've got sky broadband at the moment it my house, and am using the modem/router they supplied us, however it's not very good - the range on it is not very far at all. I was wondering if I could...
  5. Thread: -> operator

    by bertazoid
    Replies
    2
    Views
    1,019

    Makes sense. Thanks alot.

    Makes sense. Thanks alot.
  6. Replies
    10
    Views
    43,928

    try: fgets(word,15,stdin); the first...

    try:


    fgets(word,15,stdin);

    the first argument of fgets is the string which you want the read data to be stored, which is "word". If you haven't declared a string "szo" yet in your code I'm...
  7. Thread: -> operator

    by bertazoid
    Replies
    2
    Views
    1,019

    -> operator

    what does -> mean in a c or c++ program?
  8. Replies
    7
    Views
    1,344

    Thanks both thats alot clearer now :)

    Thanks both thats alot clearer now :)
  9. Replies
    7
    Views
    1,344

    matsp, that's a really good example thanks. Also,...

    matsp, that's a really good example thanks. Also, I forgot to ask my other question: What's the point of using cin and cout instead of printf etc to output to a terminal or file? There must be some...
  10. Replies
    7
    Views
    1,344

    Ok thanks, that's easy enough

    Ok thanks, that's easy enough
  11. Replies
    7
    Views
    1,344

    moving from c to c++

    Hi, I've been programming in c for a while, and have started reading about c++. Having never done any OO programming before, I'm trying to get my head around objects and classes.

    I've read that a...
  12. Replies
    15
    Views
    2,430

    Thanks :) How do I start writing and...

    Thanks :)

    How do I start writing and compiling programs then? For instance in linux I would use gedit to write a program, and compile it from a terminal.
  13. Replies
    15
    Views
    2,430

    Hi thanks for all the replies. I'm just wondering...

    Hi thanks for all the replies. I'm just wondering can I program things in dos using MinGW and cygwin?

    I don't want to be able to make full blown applications with GUI's on windows.

    Also, I've...
  14. Replies
    15
    Views
    2,430

    Yeh but doesn't this allow you to access the...

    Yeh but doesn't this allow you to access the parallel port registers?

    Also I have some code here for checking the BIOS data area to obtain the memory locations of the different ports connected to...
  15. Replies
    15
    Views
    2,430

    Hi matsp, then what is the conio.h library all...

    Hi matsp, then what is the conio.h library all about? I thought this included functions for parallel port I/O. I have seen a couple of examples of c code where conio.h has been included to...
  16. Replies
    15
    Views
    2,430

    Hi matsp, thanks for the info. Mingw looks ok...

    Hi matsp, thanks for the info. Mingw looks ok I'll probably get started with that. for one program I need to use the include files dos.h and conio.h for interfacing with the parallel port. I assume...
  17. Replies
    15
    Views
    2,430

    Programming c on windows

    Hi, I've just completed a short course on c programming, where we used linux as a platform - editing with gedit, and compiling with gcc from the command line. I wan't to start making some programs on...
  18. Replies
    16
    Views
    12,043

    Thanks, I was under the impression I could only...

    Thanks, I was under the impression I could only pass arrays to functions as pointers. Well if not, great, since it's confusing as hell.

    As for the first errors, I thought I had already specified...
  19. Replies
    16
    Views
    12,043

    I tried this: #include int...

    I tried this:


    #include <stdio.h>

    int add(int (*a1)[][3], int (*a2)[][3], int (*a3)[][3]){
    int i,j;
    for(i=0;i<3;i++){
    for(j=0;j<3;j++){
    a3[i][j]=a1[i][j]+a2[i][j];
  20. Replies
    16
    Views
    12,043

    I'm trying to write a function that takes two...

    I'm trying to write a function that takes two (same-size) 2D arrays of numbers and adds them element wise, returning a third 2D array.

    using:



    int add(int (*a1)[][],int (*a2)[][])
    {...}

    ...
  21. Replies
    16
    Views
    12,043

    Pointers to 2D arrays

    Hi, how do I declare pointers to 2D arrays, and how can I then pass these as arguments to a function? The syntax must be different to that of 1D arrays, since I keep getting compiler errors when...
  22. Replies
    3
    Views
    12,364

    Thanks, I'll give it a try.

    Thanks, I'll give it a try.
  23. Replies
    7
    Views
    7,260

    I thought it was possible, but never actually...

    I thought it was possible, but never actually tried it myself, seems an obvious enough extension of being able to read/write .pgm images though.

    OP: If you want to program a GUI in c, then you can...
  24. Replies
    3
    Views
    12,364

    function pointer calculator

    Hi, I'm trying to learn about function pointers and how to use them.

    I have the following partially written program in c for a simple calculator, and without using a switch statement, how can I...
  25. Replies
    7
    Views
    7,260

    You can 'create' greyscale .pgm images using c,...

    You can 'create' greyscale .pgm images using c, provided you already have a file for the image to be created to, in the same directory as the executable. I think you can do simialr things with...
Results 1 to 25 of 110
Page 1 of 5 1 2 3 4