General C++ Programming - January 2019 (Page 3)

undefined reference when calling a function of a static library
 
I have two c++ programs (mqsim.cpp and ramulator.cpp) which are the main programs of two large projects and I want to use the functions of them in a main.cpp. I...
[1 reply] : Run "nm -C libramsim.a | grep print" and see if the libramsim indeed c... (by dhayden)
by helios
HELP!!! Vectors Display Student Records
 
Don't double-post. You're wasting people's time. http://www.cplusplus.com/forum/beginner/248956/
[16 replies] Last: The problem is that the forum software is custom. If Twicker doesn't i... (by helios)
CMake tutorial, explain build configurations
 
hello community, I am following the CMake book to learn about CMake. I have trouble to follow chapter 3: build configurations (https://riptutorial.com/cmake/e...
[1 reply] : It's not "wrong" to ask this question here, but you may get better ans... (by helios)
Help in writing solutions manual
 
I’m a TA for a computer programming class and I’ve completely forgotten to write the solutions for the problem set this week. Please help me if you can than...
[5 replies] Last: Well that's an interesting take on the "My dog ate my homework" excus... (by closed account E0p9LyTq)
Can't code without admin access
 
I work with computers my entire shift and sometimes there are hours that go on without anything to do. At work I can't do any programming via a IDE, because the...
[5 replies] Last: This sounds very much to me like you are not doing your job. If you ha... (by Duthomhas)
Convert string to logical operators
 
I need to convert string "or; and; not" to a logical operators. these are the given bools: a=0; b=1; c=1; d=1; e=0; I read this line from the file: a and not...
[11 replies] Last: you can use vector for a cheap stack tool for this to get started, via... (by jonnin)
by Mietek
What is false
 
I can't find what is wrong in my program. Is somebody who knows ?. #include <iostream> #include <conio.h> #include <time.h> #include <cstdlib> #include <io...
[2 replies] Last: #include <iostream> #include <ctime> long long int fib(long long int... (by Grime)
by Allaye
key word break wont break out of the loop
 
do { cout << endl; cout << "Enter Your Blend Key from -11 to 10" << endl; beta = 1.0; cout << endl; cin >> alpha; if ((double)alph...
[6 replies] Last: You really, really ought to read up on what the comma operator actuall... (by MikeyBoy)
Dice rolling (New to board)
 
Hello everyone. This is my first post to this board. Forgive me if I mess a few things up or don't know how to do some things. Anyways, on to the problem. My pr...
[3 replies] Last: You have the classic = bug. comparison is ==. assignment is =. assi... (by jonnin)
Having trouble with a college project (C++)
 
So im doing a college project, it is a software to manage orders in a pizzeria, i already wrote the code but when i execute the program it only allows me to use...
[3 replies] Last: double post in http://www.cplusplus.com/forum/general/ (by H00G0)
Proper way to absolutely delete a pointer to pointer
 
Hi everyone, I defined a pointer to pointer (p2p) as: int **my_list = NULL; After assigning values to this (p2p). I want to delete it, but I am confusing severa...
[7 replies] Last: a lot of people will tell you to set null after delete. delete ptr;... (by jonnin)
Connect 4 Win Checks!
 
So a Connect 4 board is 6 rows and 7 columns, I want horizontal, vertical, and diagonal win condition checks. So far I have horizontal wins checker. bool hwin(...
[1 reply] : Double post: http://www.cplusplus.com/forum/beginner/248910/ (by chicofeo)
Circular Includes
 
Hi guys, I have an include dependency tree that looks like the following: https://drive.google.com/file/d/16OolfD0RIlWrVQx187-1LPtf_889-WNY/view?usp=shari...
[6 replies] Last: #pragma once also works across many other C++ compilers. Apparent... (by mbozzi)
by KadenV
Moving a monster in a 2D array
 
Hello fellow programmers, I am trying to figure out how to move a monster within a 2D array. The monster is supposed to move closer and closer to the player and...
[4 replies] Last: > Sorry for the messy.txt, it is supposed to be 20 by 60 Here's a tip.... (by salem c)
Overloaded operators subtraction
 
So I'm trying to subtract wholeParts which represent a currency like dollar and fracParts which represents the coin like cents. I've tried doing this a coupl...
[3 replies] Last: Currency d4 = *new Dollar(0,0); Don't do this ! You're introduci... (by Ganado)
Project Euler Problem 3
 
Hi all, Recently trying to get back into programming and figured going through the Project Euler problems would be a good way to do so. However, I'm stuck on n...
[14 replies] Last: well duh, of course :) (by jonnin)
by dutch
Can anyone explain this probability paradox?
 
Tossing a coin until you get two heads in a row takes an average of 6 tosses. But to get a head followed by a tail takes an average of only 4 tosses. The follo...
[14 replies] Last: I guess the -1 can be interpreted as "subtracting" (removing) the fina... (by dutch)
by H00G0
Thoughts on small project of mine?
 
Hello people! I'm posting here because I'm "working" on something which is more of a leisure project than anything, and I'd like to know what you think about...
[8 replies] Last: Congrats on your 256th post you're now officially a byte. Haha thank... (by H00G0)
by frek
C++ (socket) programming on Linux
 
Hello, I read a little about socket programming and now want to use non-Boost Asio library for C++ socket programming using gcc on Linux (Ubuntu). I'm conf...
[5 replies] Last: I reasonably good IDE on Linux etc is kdevelop. I has code checkers ... (by kbw)
What is the usability of providing relational operators '<', '>' for unique_ptr
 
Hi, I was just wondering what is the reason for providing relational operators '<', '>' for unique_ptr ? I have never come across any code using these rel...
[12 replies] Last: [quote=Peter87] You mean like std::set and std::map? Yes. umm... I... (by kapil2905)
January 2019 Pages: 12345... 7
  Archived months: [dec2018] [feb2019]

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