General C++ Programming - March 2016 (Page 10)

SOLVED
 
SOLVED :)
[2 replies] Last: For context, this is the original code: #include <iostream> #include... (by Chervil)
Why isn't copy constructor called?
 
Hi there. I've this class member function: MyClass(const MyClass& copy) { cout << "copy ctor"; } MyClass(MyClass&& move) { cout << "move ctor"; } s...
[11 replies] Last: It depends on what the compiler can or chose to do. (by Peter87)
Polymorphic Objects, Templates, and Data Abstraction
 
Hi all, I started working on a binary search tree for a school project. Initially,I had planned to make it templated as I also wanted to make AVL/Splay trees...
[7 replies] Last: I don't want whomever uses the container to have direct access to the... (by goosestuf)
What is generic Programming ?
 
Can anybody tell me what is generic programming in simple language, Yesterday I was reading a book, I came to know about this term, I googled it but I did not g...
[1 reply] : I'll give it a try: generic programming is an approach to programming ... (by Cubbi)
ADT Stack
 
Im trying to learn about stacks as an abstract data type creating my own. my code complies but im getting a logical error when displayed I keep getting a 12 or ...
[8 replies] Last: I believe Line 1 of your corrected code ArtisticMess should be the fo... (by stilts9119)
char[] breaking code when using it
 
I wasn't sure exactly how to phrase this, but I have a char array of 50 where the first say 5 characters are my specified string (int this case "adder") and the...
[4 replies] Last: runs TestFunction seemingly like myBuffer is null Then maybe it is ... (by dhayden)
program not looping
 
not sure if i got something wrong. program is ending after first input and when i enter 'Y' for another record for the text file. am i not suppose to use text...
[5 replies] Last: ok so how do i make the data in the text file an array ? (by ekincaid2002)
Vector Of Strings/Char Arrays
 
I have a class and I need to add a vector of strings or char arrays to it. I tried both ways, and I always get weird results, like random characters trough the ...
[no replies]
Tip for Fraction class
 
Hey guys, I'm making my own Fraction class. I have a method that simplifies the fraction by diving numerator and denominator for their G.C.D Fraction Fracti...
[3 replies] Last: Since you're modifying the object, return a reference. There is no re... (by cire)
system read error
 
Hi, i want to cin a value for a for the system but it give me a lot of errors. Code: #include <iostream> #include <string> #include <stdlib.h> using namespace...
[1 reply] : Line 11: system() takes a const char * . What you're trying to pass... (by AbstractionAnon)
Secretly open browser
 
Please remember im a beginner!, this is first time when i use this site, its a good one! Hi, i use: Windows 10, Code Blocks I want to know if theres an command...
[1 reply] : Using a web browser is overkill if you are not going to show it to the... (by Peter87)
by homing
are non array values continuous in memory?
 
Hey guys, afaik data in memory is continuous if i declare e.g a array. But is it also guaranteed that data. e.g Integers are continuous if they are declared & ...
[5 replies] Last: ok good to know. I had no idea that such padding exists x.x (by homing)
by shalin
link error 1181
 
Hi friends!! can anyone let me know how to clear this error? 1>------ Build started: Project: longrangeDLL, Configuration: Release Win32 ------ 1>LINK : fa...
[1 reply] : The file named "longrangeDLL.lib" either doesn't exist, or the linker ... (by Moschops)
by mkb555
Updating the conditions of a for loop
 
This is kind of a general question about for loops, something I've never had the chance to test. Lets say we have a for loop like this: for (int i; i < b...
[2 replies] Last: That's what I wanted to know, thanks! (by mkb555)
by plexus
Fastest way to write to a disk
 
I'm trying to fill up a disk drive with random data (3TB). Mainly to overwrite the whole disk with gibberish, but also for the fun of doing it myself. I'm awar...
[2 replies] Last: call the disk driver interfaces directly, no cache, no filesystem, all... (by uriza)
Pointers
 
Can someone explain how I would complete this: For the quantities, use a pointer to the first item of an array of int. An example of the declaration code may l...
[1 reply] : Hi, If you need any help, email me at sparkprogrammer@gmail.com Joe (by Little Captain)
Error C3867 Binary Tree Child Pointers
 
Hello, I have a problem with a function that outputs a binary tree as an "inorder string". I've used such a function before so I know the logic of it is right,...
[2 replies] Last: I figured it out, it was the function getLeftChild() and getRightChild... (by SuperMelons)
by ToT
About the error: expected initializer before ??token problem
 
I wrote the code for the pointer as a return type, but why my function cannot be use. This is my code. #include<iostream> #include<stdlib.h> #include<cstddef...
[2 replies] Last: 1. add a prototype declaration before the start of main() int *getRan... (by Chervil)
Will the compiler auto optimize the if statement?
 
I have a question about whether the compiler will auo optimize the if statement. E.g: case 1 : if (conditionA && conditionB) { do something } case ...
[2 replies] Last: Thank you ! (by buddha87)
by Morkus
convert const fmx::Text to c string?
 
Hello, I'm trying to write a FileMaker plug-in function. In this function I create a "const fmx::Text" which is the text from FileMaker (in this case a fi...
[2 replies] Last: Excellent. It works now! Thanks much. :) - m (by Morkus)
March 2016 Pages: 1... 89101112... 23
  Archived months: [feb2016] [apr2016]

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