Thread: Array Type Has Incomplete Element Type

  1. #16
    Registered User
    Join Date
    Apr 2013
    Posts
    56
    Array Type Has Incomplete Element Type-screenshot-jpg

  2. #17
    Registered User
    Join Date
    Apr 2013
    Posts
    56
    Hi im using Amtel Studio 6.2

  3. #18
    Registered User
    Join Date
    May 2010
    Posts
    4,632
    How did you create your project?

    And how did you add the files to the project?

    Jim

  4. #19
    Registered User
    Join Date
    Apr 2013
    Posts
    56
    Hi Jimblumberg,

    We are thinking along the same lines.

    I have just created a new project, then added the files one at a time by right clicking the top right bold title, and add file. Also I saved the .cpp to a .c file just in case the IDE got upset.

    This new project has worked and my errors have gone. Thanks very much for your help.

    One last question before I get this one sensor to work.

    Before you go I would like your advice. This one sensor with be used in parallel with 20 other sensors of the same type, all using different I/O port pins. So my problem is I do not want to write 20 different .cpp files (now .c file) as this is time consuming and hard work. So how can I make these header files in laymens terms a libary, and send different port address to the .cpp file. I cant think of how to do it? Any ideas. This project is at my limit and the gears are turning very slowly.

    Thanks again.

    Rocketman46

  5. #20
    Registered User
    Join Date
    May 2010
    Posts
    4,632
    I haven't looked closely at your code but you don't necessarily need to create a library file because you can call your functions multiple times with different parameters. If you design your functions properly you should be able to call the function with a "channel" parameter so the function knows what channel to access. Also remember to keep the initialization separate from the measurement functions and keep your functions small, doing as little as possible.


    Jim

  6. #21
    Registered User
    Join Date
    Apr 2013
    Posts
    56
    Thanks jimblumberg,

    You cant learn this stuff in books. A couple of questions on this forum is always so helpful.

    Thanks again for your time.

    Rocketman46

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 05-23-2011, 02:04 PM
  2. array type has incomplete element type
    By philgrek in forum C Programming
    Replies: 29
    Last Post: 05-06-2011, 02:42 PM
  3. error: array type has incomplete element type
    By gerger in forum C Programming
    Replies: 8
    Last Post: 10-05-2010, 07:40 AM
  4. invalid use of incomplete type
    By noobcpp in forum C++ Programming
    Replies: 8
    Last Post: 10-31-2008, 10:00 PM
  5. Incomplete type
    By nepper271 in forum C++ Programming
    Replies: 7
    Last Post: 01-29-2008, 11:54 AM