General C++ Programming - March 2017 (Page 14)

Counters
 
For class I must have a robot with 5 sensors on it go around a line track without going off course. I have that part down, but then every time the track changes...
[1 reply] : typically you would do something like this in your control loop. old... (by jonnin)
PPP2 Chapter 11 Exercise 6
 
Exercise specifications: Write a program that replaces punctuation with whitespace. Consider . (dot), ; (semicolon), , (comma), ? (question mark), - (dash), ...
[16 replies] Last: @JLBorges: Thanks. Well, that seemed to work on the Shell here, but m... (by DragonOsman)
Question about the linker
 
hi everyone, i'm currently using codeblocks as IDE, what i'd like to know is how does the linker know the filename of a library ? example: glfw3 if i wan...
[1 reply] : [quote=man]-l library Search the library named library when linking... (by ne555)
Constructor (initializer_list)
 
hello this is my first post and i hope you can help me :) at university we wrote a class simular to vector. it works my class works at university but not on m...
[4 replies] Last: thank you so much can now start to worry how i manage my homework ( ... (by enterei)
How to do seperate declarartion and definition of member variables, static member variables and static functions.
 
Hi ppl :), How can we declare and define static class data members separately in .h and respective .cpp file. Here is the .h file : animal_factory.h #...
[5 replies] Last: Is there a we do not need to include animal.h, cat.h, dog.h in the an... (by doug4)
How this code works
 
#include <iostream> using namespace std; class Test { public: Test() { cout << "Hello from Test() "; } } a; int main() { cout << "Main ...
[4 replies] Last: The constructor of the class will be called when the object is created... (by coder777)
Is this possible to preform with c++?
 
Basically Im taking a data structures class, and we're only 3 weeks in. I am more seasoned than I am with Java, however my teacher chooses to teach solely in Ja...
[1 reply] : whether or not its even possible to do what he wants using c++ yes,... (by gunnerfunner)
Passing actual variables to a function
 
I discovered the windows thread function recently and I saw that it can take actual variables and transfer them to the thread while keeping their names and work...
[8 replies] Last: You can create a struct/class to store your variables and pass that to... (by integralfx)
not able to insert pointer into map<char,trnode*>
 
#include <map> #include <cstring> #include <cstdlib> #include <iostream> using namespace std; struct trnode { map<char,trnode*> m; boo...
[1 reply] : The problem is this: temp1 = (trnode*)malloc(sizeof(trnode)); You ... (by coder777)
Any way to create an ifstream within an ifstream?
 
Hi! I've been tinkering around with .GRP files from back in the day. GRP files store content in them with a set size defined in the GRP file. Essentially just u...
[3 replies] Last: I keep hearing about mmap, though I never get around to looking deeper... (by newbieg)
by iiiiii
Implementation of Hashing
 
Need help in writing the code. I'm posting the Lab description and code I've done so far. Purpose: Use Hashing Techniques Create a ADT to handle the data ...
[1 reply] : What does 'not running properly' mean? You will read beyond the the e... (by coder777)
by iiiiii
Hashing program showing (lldb) in Xcode
 
Hi everyone, I'm working on c++ code for implementing the hashing but when I run the code it is showing me the (lldb) error in Xcode. Here's the code please hel...
[1 reply] : Maybe this might help: http://stackoverflow.com/questions/17242760/xc... (by coder777)
Can anyone translate this C code to C++? Code for Program that performs add, edit, delete, display and search date from file.
 
#include <stdio.h> #include <conio.h> struct biodata{ int recno,age; char name ,sex; float salary; }; void main(){ void ...
[1 reply] : Can anyone translate this C code to C++? Code for Program that perfor... (by Mantorr22)
by iiiiii
hashing
 
Hi everyone, I need some help in homework lab Purpose: Use Hashing Techniques Create a ADT to handle the data in the Customer.csv data file: (last,first,i...
[1 reply] : What is the question you had? "Help" is a little vague as to what yo... (by jonnin)
How to open .exe or .cpp programs from a main .cpp program?
 
Alright, so I know many people have asked this before. I am trying to make a program that will open other programs when the user enters a certain number. I have...
[2 replies] Last: it might work better for executables to use "start path\\programname.e... (by jonnin)
Erase any element from the list while iterating
 
How can I remove any element from the list while iterating? std::list<std::string> l; l.push_back("b"); for (auto it = l.begin(); it != l.end(); it+...
[6 replies] Last: #include <algorithm> template < typename SEQ, typename X, typename Y... (by JLBorges)
by jowhi9
Maze Paths
 
My program simulates a standard maze. After it runs, you would be asked the maze’s size; by entering an odd integer which signifies the number of rows and co...
[no replies]
function to draw a diamond
 
I need to do this. Finally, you will draw the diamond using a programmer-defined function that accepts both the integer and the printable character entered b...
[2 replies] Last: Please, do not double posts... twice :-) http://www.cplusplus.com/foru... (by Enoizat)
code snippets? Correct?
 
Snippets create objects below, but I am not sure I know what I am doing completely. Could someone please double check what I am doing? variation 1 ...
[4 replies] Last: If I don't, what happens to my ctor values? Do they not get loaded?Ar... (by gunnerfunner)
by RNBW
Analyse a beam (Part 3)
 
//------------------------------------ // CALCULATION OF MOMENTS ALONG BEAM //------------------------------------ for...
[3 replies] Last: @dhayden Thank you for your comments, particularly the last bit of cod... (by RNBW)
March 2017 Pages: 1... 1213141516... 19
  Archived months: [feb2017] [apr2017]

This is an archived page. To post a new message, go to the current page.