General C++ Programming - December 2017 (Page 12)

by vtepe
Namespace x has no member y | Adding namespaces to existing project
 
Hello! I need help :< I have an existing project which worked fine until I decided to isolate a module and add it into its own namespace. Situation looks a bit...
[2 replies] Last: Thanks, found the problem. Turned out that it was with the additional ... (by vtepe)
by fraC19
Reason for causing Breakpoint
 
Hey guys, I'm currently working with my friend on an assignment which we need to find the shortest path to each point by using prim's algorithm. And here is our...
[7 replies] Last: yea, I just came up with the same idea after reading your reply, which... (by fraC19)
Getting same MIPS error message
 
spim: (parser) syntax error on line 11 of file /Users/TheKid/Documents/ProgramTemplete.s file 1 “” ^ I am using TextEdit on Macbo...
[no replies]
list class std::initializer_list constructor problem (1,2)
 
I need help with a std::initializer_list constructor for my custom list class. I got a "Access violation location <memory address here>" error on it inside the...
[36 replies] Last: I went back to having end() be nullptr. I was having trouble with the... (by DragonOsman)
by YikUTM
Wrong values read into array from file?
 
This is my code #include <iostream> #include <fstream> #include <string> #include <cmath> #include <cstdlib> using namespace std; //Function Prototypes void ...
[4 replies] Last: But, when I compile my code using dev c++, it can be compiled. That'... (by Chervil)
chess engine performance messed up after optimizations
 
Hi, i'm writing a chess engine for fun using alpha beta pruning (https://en.wikipedia.org/wiki/Alpha%E2%80%93beta_pruning). i've changed my whole coordinate sy...
[no replies]
Instead of using a string would like to read in a text file so user doesn't have to input anything
 
// // main.cpp // Threshold.cpp // // Created by Mikel Wille on 11/30/17. // Copyright © 2017 The Error 404. All rights reserved. // #include<stdio.h> #i...
[1 reply] : You need to include <fstream> BTW. Why this mixture between C and C++... (by Thomas1965)
I need help - urgently (1,2)
 
Hello, I am new to this forum, and here is my problem. Topic: accountancy program I am currently making a C++ program that is gonna compare a huge amount o...
[21 replies] Last: Thanks for all the answars, I will try to find some starting points fo... (by KomHeim)
Problem with “GNY07D - Decoding”
 
Hello, I am trying to solve this problem on SPOJ. However, the judge is returning “runtime error (SIGABRT)”. Can someone please tell me what’s wrong with...
[1 reply] : Nevermind, I managed to solve the problem. (by kimchiboy03)
how to settle this question?
 
A lecturer who is invited as a speaker on trainer by any government organization will be paid according to the rate as stated above. Write a function that accep...
[2 replies] Last: Write a function: code and hours as input parameters rate = according ... (by keskiverto)
Implementing algorithm::count ourselves
 
Hi, Exercise 3 of chapter 21 of the book Programming Principles and Practice Using C++ says: Implement count yourself and test it. I sought it and found...
[4 replies] Last: Thank you very much. (by Frank14)
by soby96
DERIVED CLASSES
 
Hi, i have a question about derived classes and their use. So, I have a base class Car and two derived classes oldCar and class newCar. oldCar has mileage in...
[1 reply] : #include <iostream> #include <functional> struct car { virtual ~... (by JLBorges)
Best possible outcome problem
 
Hi, I've been sitting here for a while now thinking about a problem. It basically goes like this: You receive a number of building blocks, they have all got b...
[2 replies] Last: what can you do with it if you sort all the blocks by height, and then... (by jonnin)
Need help with Kruskal's Algorithm
 
Hey guys, I am new to this forum, and I've been stuck in this problem for more than two days without any solution, so I really need you guys help. Here is my c...
[1 reply] : Edge G_kruskal::mincostEdge() { int i, min; long minweight = INT_MA... (by ne555)
by agill
Creating a searchable array of strings
 
Hello! I've been trying to create an array that holds two pieces of data and allows the first column to be searched but print out the second column. I've see...
[12 replies] Last: Thanks for all the replies! Super helpful :) (by agill)
by navi17
Need to figure out how to sort in alphabetic order, already got it in order for grade in descending form
 
Write a program that allows a teacher to enter name-grade pairs, Ex: The user will type in the name of the student followed by the student’s grade. Dynamicall...
[no replies]
Objects in vector accessing
 
Hello! I need help with one task. class Data { int x; int y; }; class Container { private: vector<Data> v1; public: // push object into a ve...
[2 replies] Last: Yeah, it works very well. Thank you (by Rododendron)
Input file and Output file
 
Good Evening all, I had a few questions regarding this input file: 6 Bunny, Bugs Math 90 86 80 95 100 99 96 93 Schmuckatelli, Joe English 88 75 90 Dipwart, Ma...
[1 reply] : THis is for a student class inhereted by multiple class types...Englis... (by markymark99)
Point of instantiation is incomplete and should fail??
 
Hi, I don't understand why this code compiles: class MyInt { int m_i; public: MyInt(int i) : m_i{i} {} int get() const { ret...
[3 replies] Last: the indentation might have thrown JLBorges off. note that if you pare... (by Cubbi)
Help Convert Code in C++
 
Hello, please someone help me about this request. How to convert this code from pugixml to be standart c++ code, because i do not want to use pugixml. .cpp ...
[2 replies] Last: xml is just formatted text. You can directly manipulate it for simple... (by jonnin)
December 2017 Pages: 1... 10111213
  Archived months: [nov2017] [jan2018]

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