Beginners - August 2020

function behaves differently if included from header
 
Hi I have a fairly simple function whose output appears to change depending upon whether the function is included in main.cpp directly or from a header. //...
[4 replies] Last: http://www.cplusplus.com/reference/cmath/abs/ (by lastchance)
cout and printing strings
 
hi guys, so a simple question that has me thinking #include <iostream> using namespace std; int main() { const char* bird = "Seagul"; ...
[4 replies] Last: thanks jlb :) (by adam2016)
tips for developing header only libraries?
 
Hi I'm developing a library which makes use of a core template class. Thus, the library is header only. I've seen a number of different approaches to header o...
[1 reply] : 4). Use 1 and 2, 1 for ~3-5 lines and 2 for longer. 3 should be avoi... (by jonnin)
Accessing Class info in a Linked List
 
My question has mostly to do with my printRecord function here. I have no idea how to access the information within the class to display onto console. I've nev...
[11 replies] Last: @sadCoder So now extend the LinkedList class to add the copy/move func... (by seeplus)
by nakash
2 dimensional arrays
 
hi, so i have been tasked with creating a dictionary application using c++ and im a beginner to coding. the task comprises of creating an application where 106,...
[4 replies] Last: Your class should be an entry for a single word: class DictEntry { pu... (by dhayden)
What's the proper way of including cpp libraries?
 
Hi!.. I've tried many times to add external libraries to my projects but I don't know what to do when they don't include a .lib file already... For example, I w...
[4 replies] Last: Thanks a lot for taking the time to respond... All the information you... (by brianbathorycpp)
cant understand oop concept properly
 
hi , is been like 6 months of me trying to understand oop but nothing... like how it's possible that real objects can implemented in a computer? or what make...
[2 replies] Last: Most computer programming, including OOP, is just about memory. Prog... (by mbozzi)
2d arrays
 
Need some help pals, let us say that we have a square matrix and the task is to display the first 2 inner squares from it. Initial matrix : 00 01 02 03 04 ...
[3 replies] Last: @jonnin @lastchance thank you so much for all your help, appreciate it... (by MaxGreen)
Active window text
 
I'm getting handle and title of active window HWND hwnd = GetForegroundWindow(); GetWindowText(hwnd, wnd_title, sizeof(wnd_title)); How I can read ...
[2 replies] Last: getwindowtext can be powerful but it was really intended to be used fo... (by jonnin)
Confused
 
Can someone explain this nested for loop? int result{}; if (vec.size() > 1) { for (size_t i=0; i< vec.size()-1; ++i) ...
[3 replies] Last: If you want to understand what a piece of code is doing, you could get... (by andywestken)
by mbozzi
C++ help
 
You removed the content of your prior thread. This forum is public specifically so that others may contribute to and benefit from the discussions held here. H...
[1 reply] : its the same question he removed from the other thread that has the an... (by jonnin)
by romey
Bool value seemingly ignored in if statement
 
When I run my code, it is processing past the if statements whether or not they are being evaluated correctly. If you run it, you will notice that whatever i...
[2 replies] Last: Hello romey, I have a question. In the first for loop, line 28, do yo... (by Handy Andy)
by jerryd
Font for text to file
 
cplusplus forum, I'm writing some alpha numeric text out to a file with my program and would like to change the font size, make it bold etc. Can't find a...
[2 replies] Last: Check this: https://www.youtube.com/watch?v=lEZkQvQ6ivU, it will help ... (by Adisharma)
by jonnin
Is it possible to install Visual Studio on an externa HD?
 
I don't know about the full version; my gut tells me that it has registry and path and OS level crap that prevent you from doing this easily. (You may be able ...
[3 replies] Last: I've played around with Docker, and it would be a pig on an external d... (by George P)
Problem with boolean search function.
 
I am currently writing a program for an assignment in data structures class. The assignment says "Write a program that fills a 5 x 5 matrix of integers. The ma...
[5 replies] Last: But as you noted, you can not create functions inside of other functio... (by jlb)
by Grime
std::cin >> string and EOF
 
#include <iostream> #include <string> int main() { std::string input; std::string output; int i = 0; while (std::cin >> input) { output += input + ' ...
[2 replies] Last: Thanks for replying (and the tips), Andy. Theoretically the "^Z" sho... (by Grime)
please help
 
Add a for loop that will:  generate a number of 1's and 2's as requested by the user  add up the number 1's and 2's generated and store the values in v...
[2 replies] Last: Hello ranugive, PLEASE ALWAYS USE CODE TAGS (the <> formatting butt... (by Handy Andy)
Recommand async io library/framwork?
 
I have a program to write data to multiple files and want write different files in parallel. That is like I just submit data into a centrallized context, and...
[no replies]
New to virtual methods
 
I am working through Sam's Teach Yourself C++ For Linux In 21 Days. Yes, it's an OLD book (Copyrighted 2000) but I HAVE it and the concepts seem relevant. I'm...
[6 replies] Last: PS It doesn't make (common) sense to go to all the trouble of designin... (by againtry)
CodeBlocks question
 
I have a program for a course that requires C++ code and the output be assembly. With optimization levels activated as well. I don't know much about this settin...
[3 replies] Last: see if this guy's post helps. https://stackoverflow.com/questions/20... (by jonnin)
August 2020 Pages: 123... 8
  Archived months: [jul2020] [sep2020]

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