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

Multiple c++ OpenGL errors that I don't know how to fix...
 
Hello I am making a window in OpenGL (I assume) and I get 42 errors here are two that I am trying to fix: " 'glVeiwport' was not declared in this scope" " 'gl...
[3 replies] Last: And you have other typos as well, if you still want to get your progra... (by Ganado)
trappings of stof()
 
Please tell me how to keep stof. Ive read it to be problematic. I am getting an error \src\main.cpp:18:9: error: 'stof' is not a member of 'std' I've ...
[18 replies] Last: That worked, thank you. (by technologist)
Best Graphics Lib for Static Link
 
Hello All, I'm currently using Allegro 4.4.3 with both Eclipse (for Linux) and Portable Dev C++ (for Windows). I know the 4.4.3 revision of Allegro is not t...
[no replies]
time_get<> : I/P from cin is OK; I/P from an istringstream gives an error
 
I have used the time_get<> facet's get_date() method to read a date from the following sources: (i) cin and (ii) an istringstream based on a string s whose...
[no replies]
How do I change the colour of data points in a C++ generated Excel chart?
 
I am in the midst of creating a project in C++ where I have to display some of my results on an excel chart. I have learned how to create all the charts that ...
[no replies]
C++ programs not running in codeblocks!!😕😕
 
Hi all, Please help me to solve a problem mentioned below. when i try to run my c++ programs in codeblocks after sucessful compilation, it says that ".exe f...
[1 reply] : For some reason your program crashed. Without code it's impossible to ... (by Thomas1965)
Sharing part of files without disclosing functions definition of other files
 
Hi, Let's say I have a C++ code with 3 libraries, A, B, and C, each containing .h, .inl, and a few .cpp files. Most of the classes and functions are template...
[1 reply] : The problem main problem is dealing with templates. So the trick is t... (by kbw)
C++ App Ideas - 2018
 
Hey guys, I just wanted to know your opinion on some app ideas that need to be made or can be improved so that I can focus on that as a project any thoughts?
[no replies]
Abstract class, polymorphism and memory managment
 
Based on my understanding C++ manages memory for me by cleaning it when variable becomes out of scope. But how does it work when I use polymorphism and abstrac...
[9 replies] Last: > What are strategies to manage memory in such usecase? Repeat: For ... (by JLBorges)
C++ Instant charger program ???
 
Hello, guys, I was just wondering if it is possible for you to write a programme that gives your device more charge or charges it without any wires, just c++ co...
[2 replies] Last: wireless chargers do exist, at tiny ranges, see your electric toothbru... (by jonnin)
How to use cmath function to round the nearest hundred
 
I am working on a project for class. I need to round a large number ex.((pi to 10 power)or(93650.237398) to the nearest hundred (93700). We need to use one of ...
[1 reply] : This should do it. Basically, it removes the two last digits before it... (by Ganado)
C++ and OpenGL error please help
 
Hello I have an error with c++ and OpenGL... So I added glfw3.h into the include folder in dev c++ and it knows that it is there but the errors that I get are: ...
[3 replies] Last: Nevermind I forgot int main... :Facepalm: (by FlamingBurrito15)
Beginner in C++
 
Hi, and thanks for your help. I'm trying to write a program that will prompt a user to enter an amount in the format of dollars and remaining cents in such a...
[1 reply] : This question may fit the Beginners section a bit better. Last questi... (by wizebin)
C++ Quincy beginner code question
 
does my code meet these requirements? The BONUS on a salesman’s SALES is a. zero if SALES is less than $2000; b. ten percent of SALES if SALES is at l...
[2 replies] Last: does my code meet these requirements? No, it doesn't compile and it... (by lastchance)
Error: expected primary-expression before 'const'
 
Hello guys, I've been working on a log in programme and there seems to be a problem with it - error: expected primary-expression before 'const' Here is my code...
[2 replies] Last: This looks like a duplicate of the most recent question you asked in: ... (by MikeyBoy)
password character length
 
Can someone show me how to write a programme that knows how many letters your password is, I'm trying to create a password page in which you're password must be...
[1 reply] : #include <iostream> #include <algorithm> #include <cctype> #include <... (by Repeater)
C++ Strange Login error
 
#include <iostream> #include <string> int main() { std::string const username; std::string const password; std::string const usern; std::string ...
[5 replies] Last: #include <iostream> #include <string> int main() { std::string use... (by jono ava)
separating dollars and cents
 
How does one separate dollars and cents? For instance, if I write a program that outputs, $5.36 how can I make it read, Your total change is 5 dollars an...
[2 replies] Last: #include <iostream> int main() { const int CENTS_PER_DOLLAR = 10... (by closed account E0p9LyTq)
by ztdep
convert double to string with "to_string"
 
Dear friends: I convert a double "1E-20" to a string with "to_string" function, but i only get "0.0000", how to resolve this problem. Regards
[2 replies] Last: std::to_string() may return zero for small floating point numbers (... (by JLBorges)
by stav
[mingw] cc1plus permission denied
 
hey, im using mingw and im trying to compile my code using the following command: g++ *.cpp -out test.exe -m32 -std=c++11 -I..\Include\ -I..\Lib\32\SFML-2.4.2\...
[3 replies] Last: Does MinGW's G++ support the -pipe argument? This is supposed to su... (by mbozzi)
January 2018 Pages: 12345... 10
  Archived months: [dec2017] [feb2018]

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