General C++ Programming - February 2018 (Page 4)

Reading and printing from a Text file
 
i am trying to read and print from a text file. This code only print one row instead of 5 rows. I ha...
[1 reply] : If you only want to read and print a file you can do it like this: i... (by Thomas1965)
My vector class isn't working when i create objects
 
Whenever I try to create an object I get this error: "Implicit instantiation of undefined template...
[4 replies] Last: Oh no it doesn't, I didn't realize it needed an overload operator. Tha... (by joshgarza)
Help Needed asap! I really need help!!!!!!
 
I created the code below with three functions, I am having trouble implementing the following: *Ask...
[10 replies] Last: About why the program closes: I have no further suggestions If you wa... (by longberns)
Code Blocks 17.12: how can i add include directies?
 
imagine that i have installed DirectX SDK or even the OpenGL. how can i add the include directory? ...
[14 replies] Last: Directx SDK is donned by Microsoft. so GNU isn't compatible with it. i... (by Cambalinho)
defining function inside funtion.
 
c++ gnu compiler doesn't allow defining functions inside functions. actually what is the process beh...
[10 replies] Last: I think I'm starting to understand why nested functions were never add... (by Peter87)
Sharing Header files (Visual Studio 2017)
 
Hello, the problem is, I'm not able to share the files I need, the compiler gives a disgusting and v...
[6 replies] Last: kk (by hassanAman)
How to Change Static to Dynamic Arrays?
 
Hello Professionals, I had a discussion with my professor recently about the program I am currently...
[7 replies] Last: Thanks @coder777. You are correct :D (by kindgnice)
Help with program (if statement)
 
There is something wrong with the commented out portion of the code where the if statement is always...
[1 reply] : Either // if (arithmetic_operator != '+' || '-' || '*' || '/' || '%')... (by JLBorges)
Need help with rvalues and move constructor/assignment operators
 
I have troubles with rvalues and move operations. #include <iostream> #include <unistd.h> #include...
[4 replies] Last: > I am working on arduino project and I suppose its compiler isn't sma... (by JLBorges)
by helios
Casting pointers the hard way
 
Consider the following class hierarchy: class S{ /*some data*/ }; class A : public virtual S{ /*s...
[6 replies] Last: In the end I figured out this doesn't work. If there's a virtual inher... (by helios)
Reading from a file
 
i am trying to read a file which already exist in my system as (proj1_test1.txt) but when i rum my c...
[1 reply] : Here are the last few lines of your code, indented to show the actual ... (by dhayden)
by bdwe
Need help ASAP!! please -hardest question ever for me-
 
Try your best please! Q:- - Using a for loop statement to a. Display the third power of follow...
[2 replies] Last: Those are actually 3 different questions. Each of (a), (b) and (c) wo... (by doug4)
differnces between declaration and definition of functions and global variables.
 
hi, i have confusion regarding access of global variables and functions. i know that global variabl...
[3 replies] Last: // declaration of a function: that this is only a declaration is impl... (by JLBorges)
by turqo
Array Column Sort with quality score
 
Hi I want to implement a code in C++ in which I would like to sort columns in an array according to ...
[4 replies] Last: Ok thanks!! -std=c++ worked fine (by turqo)
by DCole
Adding a Default Constructor
 
Hello, I am new to C++ and have been reviewing the forum and watching video tutorials to assist me i...
[3 replies] Last: Thank you both for your input. I am working on modifying my code to a... (by DCole)
vector of objects error
 
this code is giving me an error in the neurons .GetArrInput(arr); function // AI.cpp : Defines t...
[17 replies] Last: i got neither of those warnings If you're compiling with GCC or Clang... (by mbozzi)
Vector & list
 
Hello, I just wanted to ask what is list equivalent to vector's : vector <int> ints; ints.push...
[10 replies] Last: I think the erase-remove idiom is the closest you get to an equivalent... (by Peter87)
How to drop a piece into Connect4 board?
 
For some reason, it won't re-print the board with the new piece. Is my drop function even right? htt...
[1 reply] : if(board == ' ') { board ... (by Ganado)
Parse Parentheses
 
Write a program to implement Algorithm 3-9, “Parse Parentheses,” matching braces rather than pa...
[1 reply] : You can do something similar to make a code prettier, tracking indenti... (by jonnin)
by jbohol
C++ General
 
Hello Masters, Greetings! For how long will c++ last? Just a curious question, if the languag...
[7 replies] Last: It will easily last 25 more. While you need a working crystal ball t... (by jonnin)
February 2018 Pages: 123456... 11
  Archived months: [jan2018] [mar2018]

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