General C++ Programming - November 2016 (Page 15)

Binary Search Tree Copy constructor crashing
 
Hello guys, after copy constructor is done, console crashes... Any idea? template <class bstitem> class BinarySearchTree { private: struct Node ...
[1 reply] : I would imagine it's more likely when the destructor is called since y... (by cire)
assembly parser
 
I have to write a program that accepts a single argument, which is the name of a file. The file should contain a series of assembly-language instructions that f...
[no replies]
How do I do something in Windows that's done in Unix?
 
I'm trying to get a MUD up and running but the instructions on how to do this are given in Unix. I want to open this MUD in Windows. Here is the included in...
[3 replies] Last: You will need to either follow the instructions in port.txt as indic... (by mbozzi)
how do i search for a name in a txt file
 
i have a program where i have to search for a name in a txt file. how do i do this. there is a lot more that this to this program but here is the main and the j...
[1 reply] : pls use code tags <> on the right of where you type (by SamuelAdams)
Compiler Help
 
I am somewhat of a beginner and I made a basic Tic Tac Toe game, I compared my code to that of the video I watched, and when I compile and run my code, it just ...
[3 replies] Last: What compiler did you use? g++ , from the Windows command line. ... (by lastchance)
Pointer Arithmetic - C programming
 
Assume that ip has been declared to be a pointer to int and that result has been declared to be an array of 100 elements . Assume further that ip has been initi...
[1 reply] : *(ip+1) <- advance the pointer one element and dereference the resul... (by cire)
by KVin
how can I make this program quit after the user writes 0:0:0 in this format (1,2)
 
1 #include <iostream> 2 #include <windows.h> 3 using namespace std; 4 5 int main() 6 { 7 int seconds, hours, minutes, timeinsec; 8 char colon; 9 10 co...
[25 replies] Last: or implement a key reader ... like getkey() (by closed account 48T7M4Gy)
by ztdep
how to timer in c++
 
Dear frineds: I want to perform a function which will return a value if no input after 5 seconds. Which function should i use in C++ Regards
[2 replies] Last: OP: Check out kbhit() (by gunnerfunner)
by bozmin
passing an object through functions
 
I have a object called Shopper that i want to pass through an other function, but i didn't find how todo it. I called the function HardwareStore::inputShopper()...
[2 replies] Last: Sorry, thats what i wanted to do. i just updated it. just Copy and Pas... (by bozmin)
Class Syntax
 
I am currently a student studying c++ programming. For our semester project we have to create a Text-Based Adventure Game. I think I wan't to use classes but my...
[1 reply] : Here is an exemple: https://www.youtube.com/watch?v=O3WZ4X2R-9g You ... (by BobMorane)
Need some help formatting calendar
 
Hi! So I have a program written to build a calendar. It is currently set to output the days of the month in a straight line. How can I change my program to have...
[1 reply] : iomanip has manipulators for left, right etc but no center. So, I firs... (by gunnerfunner)
Is there any way to change the colour of a string within a string in c++
 
This is the code, I have a string called Battlelogs which stores the result of all the battles that take place in a turn, FactionFighter is the name of the atta...
[4 replies] Last: It's best not to use all caps for enums to avoid name clashes with mac... (by ravenodin)
Memcpy function
 
i want a memcpy function which s2* copy to s1*
[1 reply] : http://www.cplusplus.com/reference/cstring/memcpy/ Does this not work ... (by integralfx)
why isnt this printing 500
 
#include <iostream> using namespace std; int main() { string input; cout << "Enter the name!" << endl; cin >> input; if (in...
[2 replies] Last: #include <iostream> #include <string> int main() { std::str... (by boost lexical cast)
Card Database Assistance
 
I have been trying to create a card database keeping program using c++ but when i try to compile the cord I have written I end up getting a temple argument dedu...
[7 replies] Last: Alrighty thank you for all your assistance. (by Evaspartan58)
by bozmin
error passing object type to a function
 
The problem I have is how to pass an Object element trough a function that exist in an all other file. Here is a part of the code I am working on Simulato...
[2 replies] Last: Look at this line (line 10 in your second code snippet): lineQueue.p... (by MikeyBoy)
Functions need help plz
 
This is what my code looks like #include<iostream> #include<fstream> #include<iomanip> #include<string> using namespace std; int sumList(const int , int); ...
[3 replies] Last: so can I treat array elements as single value? Sure. Each array el... (by MikeyBoy)
Compound assignment
 
Question. Is: value *= expression always equivalent to value = value * expression where value is any int or double, expression is any expression invol...
[10 replies] Last: value = value * 2 / 3; is not of the form value = value * expressio... (by Peter87)
Need Help Debugging One Compiler Error
 
sasas
[1 reply] : memcpy is in the cstring header file. http://www.cplusplus.com/refere... (by wildblue)
Subscript out of range
 
Okay so this is driving me freaking insane. Testing this with input (no integers) : works Testing this by failing the condition (using a space) and then inputi...
[1 reply] : You don't update the value of uLength when nameFile changes on line 20... (by helios)
November 2016 Pages: 1... 1314151617... 23
  Archived months: [oct2016] [dec2016]

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