General C++ Programming - February 2020 (Page 5)

Code automation depending on result
 
Hi guys, I'm trying to implement my own heap for the very first time, I have been told that heaps are normally implemented using a vector or an array but it ca...
[3 replies] Last: Thanks Duthomhas I'm actually trying to store this heap data structur... (by adam2016)
How can i add a space to a string that is input by the user.
 
The += operator is replacing the entire string. I don't really care how its done, i just want to add a space to all strings with an odd amount of characters. Wh...
[2 replies] Last: I got a loooong program to write. This will help me get going. THANK Y... (by jtnumber26)
For loop iterations.
 
Hello , I would like to write a for loop that runs through the string length, advancing two steps each iteration. Also i would like to store the 1st of the 2 nu...
[1 reply] : for (int i = 0 ; i < the_string.length() - 2; i=i+2) { // do someth... (by Repeater)
by dutch
studying variadic fails
 
Apparently the question has been deleted, but bizarrely, it was an exact copy of http://www.cplusplus.com/forum/general/267514/ , as abdulbadii has mentione...
[2 replies] Last: please OP don't pirate question : http://www.cplusplus.com/forum/gener... (by marhuum)
N64 Mouse Input Hack "Need advice"
 
Hey, I'm working on an n64 jet force Gemini mouse input hack and I know that it uses the X-axis and Y-axis to move the player I found the addresses in memory ...
[no replies]
by Norej
Using getline with input file
 
Okay so i have an input file that is formatted like this (spaces are arbitrary) Adam Zeller 452313 78 86 91 64 90 76 Barbara Young 274253 88 77 91 66 82 93 ...
[3 replies] Last: http://www.cplusplus.com/doc/tutorial/files/ http://www.cplusplus.c... (by againtry)
display .cfg file content
 
Hi guys! I'm new in visual c++ 2008, and I need some help. How to display .cfg file CONTENT in richtextbox from item selected in listbox1? I tried ...
[5 replies] Last: I'm sorry to comment again, but I have another problem with saving the... (by HUNLevi)
Overloading
 
I am trying to create an overloaded assignment operator so I can assign a linked list from RHS to LHS. I can't run my program through the debugger because I get...
[3 replies] Last: I was getting lost at that point, but I now see that getPointerTo* sho... (by stoneJax)
Pass 2-D Vector to Class
 
This is my attempt at passing a 2-D vector of arbitrary element types, inner and outer lengths to a class and printing its contents. There are a few issues but...
[1 reply] : https://stackoverflow.com/questions/60179615/array-index-overload-bug (by Duthomhas)
What is the most accurate way to find out the current physical memory usage by my program ?
 
What is the most accurate way to find out the current physical memory (RAM) being used by my c++ program in linux using c++. I am looking for something like : ...
[5 replies] Last: Thanks Ganado for all the useful info ! (by kapil2905)
by volang
C++ Copy assign
 
Let's say I have this: int a = 22; Now, does "int b = a;" create a copy of the entire object and all it's members or just "22"? If it creates a copy of the ent...
[10 replies] Last: Adding this to keskiverto program shows: #include <iostream> struct x... (by coder777)
by volang
C++ Operator[]
 
struct ptr { int operator (int a){ return 3; } }; int main() { ptr x; cout << x ; } I like this "operator thing", but how can do the same with...
[5 replies] Last: Perfect! Thank you both. (by volang)
No output
 
Why does this don't output anything? #include <iostream> #include <vector> using namespace std; int main() { int num=0; std::cin>>num; ...
[2 replies] Last: It doesn’t output anything because yabi is just taking the piss. (by againtry)
Car license plate
 
I want to make a program, which first takes one license plate which is supposed to be mine and then three other license plates which are from others. Now, the ...
[18 replies] Last: Ok now wrap this thread boring as batshit thread up yabi. There’s no... (by againtry)
How to change the status bar message/font color of a dialog window
 
I can hardly figure out Notepad++ how to change its status bar message/font color of the find dialog window. All I found was void FindReplaceDlg::setStatusbar...
[1 reply] : I am a little out of the loop but the way it used to work was you made... (by jonnin)
by Norej
selection sort
 
The task is to get 6 test scores, find the lowest score and drop it , and then average the remaining 5. Would it be possible to implement a selection so...
[6 replies] Last: extra points for doing something inefficiently. Sigh. sort it, and th... (by jonnin)
conversion from 'char*' to non-scalar type 'Date' requested
 
Hello. I am trying to create a segment of code that will tell me the days between current local time and given time inputted by the user. My code is here below ...
[3 replies] Last: Thank you very much! I suppose creating a biodiesel would help prevent... (by Alexshort123)
Moving functions & main() code to void generateReport()
 
"You'll need to print out the yearly profits in generateReport() along with everything else (that's the only way to get it to appear all together) - so make sur...
[2 replies] Last: The basic instruction is to turn your main() function into generateRep... (by Duthomhas)
image won't open (1,2)
 
Hi, I am trying to send an image from server to client. The code below is the part of the server sending the image. It looks like that everything is running sm...
[39 replies] Last: long converted_number = htonl(imageDataVec.size()); send(new_socket,... (by salem c)
by AlanB
Constructor Error
 
I have two files, main.cpp and GroceryItem.cpp. I created a class called GroceryItem and a constructor that takes 4 arguments with member initialization list. I...
[5 replies] Last: You just need to add the default constructor for GroceryItem: ... Gro... (by MILLER XYL)
February 2020 Pages: 1... 34567
  Archived months: [jan2020] [mar2020]

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