View Single Post
  #3   Spotlight this post!  
Unread 04-02-2015, 19:05
bob.wolff68's Avatar
bob.wolff68 bob.wolff68 is offline
Da' Mentor Man
FRC #1967
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2007
Location: United States
Posts: 157
bob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nice
Re: Child function problems

I agree with lopsided. I'll add a few things as well.
* As a bug/nit - I dont see encoderDist being 'set' or assigned or incremented anywhere. Maybe outside the scope of what you pasted in. But without...it'll not operate as you intend.
* You talk about putting code into the .h header file. Header files are not the best place to put implementations (code). This is because there are other files which may EACH #include such a header file. When it gets included by multiple files, the implementation will be done multiple times and you'll at least get strange errors from the compiler which may be very non-obvious how to fix. Put implementation/code in .cpp files only.

bob
__________________
~~~~~~~~~~~~~~~~~~~
Bob Wolff - Software from the old-school
Mentor / C / C++ guy
Team 1967 - The Janksters - San Jose, CA
Reply With Quote