Beginners - May 2021 (Page 6)

by alexas
free memory (0xc0000005)
 
Hi It seems that I have a problem with the memory handling. Everything works but stops after several iterations with the code 0xc0000005. I have two 2D vectors...
[5 replies] Last: yes, anyone using ** as a parameter to a function has created a monste... (by jonnin)
C++ best practice of defining database and time variables
 
As SQLITE database of application needs to be accessed in both .main and .cpp by many functions, what is the best practice for accessing it? Should it be define...
[1 reply] : it sounds like you need an object that handles the database connection... (by jonnin)
why my code doesnt work(trying to delete element in array)
 
can someone let me know why does my code doesn't work. #include <iostream> using namespace std; class NumberList { int numbers ={100,2,31,32...
[2 replies] Last: You can't delete on an array like numbers. It's not recommended that ... (by seeplus)
Something to do
 
I just finished up programming fundamentals 1, I am not taking another programming class but want to still practice programming. Could someone give me a relativ...
[7 replies] Last: @ lastchance using PE67 = lastchance.ProjectEuler.Solution67.Algo... (by TheIdeasMan)
Stroustrup - Programming: Principles and Practice Using C++ - If Statement Weirdness
 
Here is my code: // form letter #include "std_lib_facilities.h" int main() { cout << "Please enter the name of the person you want to write to(f...
[5 replies] Last: Responding to "trying to stay with what has been covered so far in the... (by Ganado)
Question About C++ Stoi Function
 
Hi everyone, I was testing out the stoi built-in function in C++. However, the code gives me an error saying that "'stoi' was not declared in this scope". I ...
[15 replies] Last: I am using Code Blocks to run my code, and I have the C++ 17.12 versi... (by George P)
by mxkxx
number and letters
 
hello! i would like to ask how to input like a code, a number with letters combined in c++ like this ("fF222")
[1 reply] : hello! i would like to ask how to input like a code, a number with le... (by lastchance)
C++ sqlite3 check if a value exists in table
 
How can I use the returned value of "sql_checkexists" function in the main? static int sql_checkexists (void* data, int ColCount, char** ColData, char** ColN...
[5 replies] Last: @seeplus Yes, this worked and it is better! I was using rc for SQLITE... (by hdcpp64)
fondobjectrecords
 
... what question? You need to provide some details.....
[1 reply] : @ seeplus It was spam, I deleted it. (by TheIdeasMan)
Pass multiple string functions into another function
 
Can anyone tell me why this code is not returning anything? #include <iostream> #include <functional> std::string getHi(){ std::string hi = "Hi "; ret...
[13 replies] Last: @ mbozzi TheIdeasMan->ThingsLearnt++; Will learn to read properly... (by TheIdeasMan)
How to check if a guess matches an index of array or just a value
 
Working on an assignment and stuck on this one portion. So what I need to do is if a char of a guess doesn't match the given word print a "_", if that guess cha...
[9 replies] Last: Solved it thank you so much! (by domweng)
Sorting the elements in vector
 
Hello everyone, Since I am quite learner, I stuck in a small part in sorting values of a vector. I have two arrays like A=[13 14 5 9 3 2 1 5] another one B=[2...
[1 reply] : write the comparison function for standard sort to use this alternativ... (by jonnin)
Program help with TUDs (total unique digit counter)
 
Hello, my code is so close to working but this pesky bug is proving hard for me to solve. It's to the point where I am being unproductive. Note that I had to us...
[19 replies] Last: my professor does not allow anything outside of cin and cout, so usin... (by seeplus)
by pidea
c function to used in cpp file
 
I want to add c function in cpp file one.h #ifdef __cplusplus extern "C" { #endif int function(int data); #ifdef __cplusplus } #endif Seco...
[1 reply] : Post your real code and real error messages. Not paraphrased and edite... (by salem c)
Undefined reference to Line2D()
 
I've some problem getting Line3D to display. I get this "undefined reference to Line2D:: Line2D" when I tried to compile. #include <iostream> #include <f...
[11 replies] Last: Its a performance hit if you are doing a LOT of things or real time gr... (by jonnin)
Float pointer to int - C
 
Hello, Could you please tell me why y is 1086219904.000000 ? #include<stdio.h> int main() { float x, y; int* p; x = 5.95; p = &x; y = *p;...
[5 replies] Last: c++ is more strongly typed. you just need a cast: p = (int*)&x; this ... (by jonnin)
conversion contacts in txt file
 
Hello. I have got file named contacts.txt. There is a text in 4 lines with information about contact. First line is number ID of person, second number is NAME,...
[6 replies] Last: Problem solved. Thank you both for help. (by macgyver1991)
Error when define virtual method in C++
 
Hello, How can I fix it? #include<iostream> #include<string> using namespace std; class employee { public: virtual void Print(); }; virt...
[5 replies] Last: The actual error is : 48:29: error: no 'bool Undergraduate::authStu(... (by TheIdeasMan)
Beginning C++
 
When you first started with C++ how were you able to become fluent in the programming language?
[8 replies] Last: Ouch. (by zapshe)
Error 0133
 
I keep getting error 0133 that says "expected a member name" for this piece of code and I dont know why m_leftPaddle.(&m_staticBlocks .getBody(m_leftPaddle...
[6 replies] Last: This one big lines of code isnt in one file. I just made it like this ... (by Raees224)
May 2021 Pages: 1... 45678... 10
  Archived months: [apr2021] [jun2021]

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