General C++ Programming - April 2016 (Page 21)

Code for menu using potentiiometer and button
I have a button, potentiometer, LCD and a K64F board. How do i go about making a menu that the user can scroll through using the potentiometer and select with ...
Apr 4, 2016 at 6:41pm
[no replies]
Class template for stack in C++
Here is the original requirements: Write a class template for a linked-list implementation of a stack. The stack class must have the push, pop and isEmpty func...
Apr 4, 2016 at 4:27pm
[2 replies] Last: You might want to try this as a test case for your code. int main() {... (by doug4)
using ## in define
on the 'if' line, i get error : Undefined symbol 'si' but i want it to use the value of 'i' not the variable name typedef AnsiString aStr; bool SelectCase(...
Apr 4, 2016 at 2:16pm
[3 replies] Last: here is the rest of the code #define SELECTCASE(sMainStr) { AnsiS... (by sergelac)
Making Program Compatible
I currently have a main.cc and a database.cc file that work perfectly, but my main.cc file does no match the one that is going to be tested. I've tried to conve...
Apr 4, 2016 at 1:22pm
[4 replies] Last: I see you took my advice from the other thread and make a separate Fli... (by AbstractionAnon)
2 dim array I/O files
So I am attempting to write a program to read from a file that is layed out like so: Name 0.0 0.0 0.0 0.0 0.0 0.0 Name 0.0 0.0 0.0 0.0 0.0 0.0 and have...
Apr 4, 2016 at 10:23am
[1 reply] : You need a second getline() probably before the second loop. (by coder777)
by norcal
Help: Rock, Paper Scissors Game
Here's the assignment: http://www.rdb3.com/python/exercises/7.8.pdf I dont know what im doing wrong. #include <iostream> #include <cstdlib> #include <ctime...
Apr 4, 2016 at 8:22am
[4 replies] Last: int userscore,compscore; userscore=0; compscore=0; Move this code o... (by Thomas1965)
How do I get a variable to recalculate with every iteration of a WHILE loop?
I'm trying to create a counter that increases in increments of two in the first column and then also increases in the second column with the numbers in the firs...
Apr 4, 2016 at 3:54am
[1 reply] : timeCalc = 0; (by SamuelAdams)
by a10e29
Mismatched Signatures???
Hi, class Foo { public: virtual void baz(void*) = 0; }; class Bar : public Foo { public: void baz(Qux*); }; I have the feeling this isn't going to work ...
Apr 4, 2016 at 3:42am
[2 replies] Last: Good answer. https://en.wikipedia.org/wiki/Precondition In the pres... (by a10e29)
out of range, no error
I am trying to force an out-of-bounds error and cannot. Can some one please tell me why this is occurring. For the first array-for each combination there is no ...
Apr 3, 2016 at 11:11pm
[2 replies] Last: "aha" Thx (by technologist)
Big int adding problem
I have a problem in adding the 2 big int that i cant adding the different length integer. can someone help me? Here is my code: #include "LargeInt.h" #inclu...
Apr 3, 2016 at 8:39pm
[1 reply] : try to use the code tag to quote your code, it will make it look much ... (by ZeroStart)
vector index.
if i have vector<string>player_0={"DK","DJ","D9","D4","H2"}; and D is for the suit of diamond H is for Heart. how do i write a for loop to check if the player_0...
Apr 3, 2016 at 3:53pm
[4 replies] Last: bool all_cards_of_same_suit( const std::vector<std::string>& cards ) ... (by JLBorges)
question mark
how to make a program where the users type "?" and the program says you have typed a question mark?
Apr 3, 2016 at 2:56pm
[2 replies] Last: its working. Thankyou. (by riyadhhossain01)
[C++] How exactly would one initialise a vector which is being created by a forward declaration?
Trying to create a vector of cSquare however I am having difficulties as the class states it needs to be initalised? How would one go about doing that consideri...
Apr 3, 2016 at 2:22pm
[4 replies] Last: // using namespace std; // avoid in header files class cPlayer { /... (by JLBorges)
problem with long integer multiplication
I am trying to multiply two user input numbers ranging from to 18, but the problem is that i cannot use long int, or string to take the input. I am basically s...
Apr 3, 2016 at 11:21am
[1 reply] : Somehow I don't understand your problem. If all you need is to get the... (by Thomas1965)
Display and Save Linked List
I have numerous functions written to implement on a linked list of objects. All I have left to write is the display() and the save_to_file() functions, which ar...
Apr 3, 2016 at 8:51am
[4 replies] Last: Option 3 by the way would look like this: Add a function declaration i... (by Chervil)
by ketnav
Caesar
Hi guys, I have written a "Caesar cipher" code but I've been stuck since 2 days trying to work out why the section of my code that is supposed to increment the ...
Apr 3, 2016 at 7:19am
[2 replies] Last: For each character you loop through all letters in the alphabet. When ... (by Peter87)
by ketnav
Caesar
 
Hi guys, I have written a "Caesar cipher" code but I've been stuck since 2 days trying to work out why the section of my code that is supposed to increment the ...
Apr 3, 2016 at 7:19am
[2 replies] Last: Please don't double post. http://www.cplusplus.com/forum/beginner/1881... (by integralfx)
[C++]Using Heading Guards But Still An Identifier Error
Wanting both cPlayer and cSquare to be able to know about each other but I do not want both includes to mess each other up. I have *learnt* about heading guarde...
Apr 3, 2016 at 6:57am
[3 replies] Last: It's just a pointer so the compiler only needs to know that cSquare is... (by Peter87)
Check to see if a file has content inside
What would be an easy implementation of reading a file to see if there are contents inside for a beginner?
Apr 3, 2016 at 3:46am
[1 reply] : inline bool has_content( const std::string& path ) { return std::ifst... (by JLBorges)
Clock() vs time() vs std::chrono::high_resolution_clock
I believe that chrono::high_resolution is the more correct and modern way of measuring time with C++ whilst clock() and time() are the old ways of getting/measu...
Apr 3, 2016 at 2:10am
[16 replies] Last: Just define _CRT_SECURE_NO_WARNINGS and these warnings would go away.... (by rabster)
April 2016 Pages: 1... 1920212223
  Archived months: [mar2016] [may2016]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.