Beginners - June 2021 (Page 8)

Character sequence (Char arr[])
I have a character sequence with alphabets, integers and punctuations. After a for loop check, I separate the alphabets and store them in a new character sequen...
[13 replies] Last: Some of it comes from Stroustrup's book, and I had to ask for an expla... (by lastchance)
Member reference base type is not a structure or union
Hi I have a class reee that accepts as parameter a container. This container could be a vector, a deque or another type. Here the header file of the class:...
[17 replies] Last: If you have a multi-file project (@seeplus's wasn't) then template fu... (by lastchance)
What api's to learn?
This might be a dumb question but I am needing help to figure it out. I am self learning, and watched a video giving steps on the best ways to learn. Ive covere...
[7 replies] Last: webapi as above is what I was calling a service. the limits are artif... (by jonnin)
I need assistance with my homework
Hi I've been stuck on this question for hours, I'm not sure how to do it. 1. From main, ask the customer which paint color they wish to purchase and how many...
[4 replies] Last: Here is a little to start with. Can you build upon this? // Example ... (by Manga)
Problem with converting double to string using sprintf function and printing it on a display
I am having problems trying to print variables to a ssd1306 display using ssd1306 library by lexus2k, there's an issue closed at lcdgfx repository about problem...
[2 replies] Last: %f is the default, 5 digits I think? if you need more: %1.16f gives ... (by jonnin)
In-place merge sort
Does anyone know how to write a in-place merge sort that does not need a temporary array to merge the two halves. I never done this type of programming without ...
[1 reply] : See this: and try... (by coder777)
[18 replies] Last: @lindsay, The value of i between lines 23 and 30 loops between 1 and N... (by lastchance)
Want to check if I understand this correctly.
I did a simple addition thing using classes. With some variables being in private. I managed to make it work by trying a lot by looking at lecture notes. #i...
[8 replies] Last: I am telling you to move your print (cout) statement in add out of the... (by jonnin)
Problem with matrix multiplication
I'm trying to create the multiplication of matrix A and matrix B. I almost done, i think, but the result is a little bit off. Do you guys have any idea? #...
[3 replies] Last: maybe, initialize c to zero? (by jonnin)
Problem with nested for loop
I am trying to create an array of twenty-six objects of the class Animal. I want to have a function that names each object a letter of the alphabet starting wit...
[11 replies] Last: Thank you all. (by BroBuilder)
substring counter not working
I've made a program that counts the number of times a substring appears within a string.It works just fine if the string has no spaces but if it has any it does...
[3 replies] Last: thanks a lot It's working now! (by caractaser)
I think there's something wrong with the cycle
I tried to add three drivers to each bus using a cycle. However, I doubt this cycle is correct, because it works only for the first few buses. Here's the link h...
[1 reply] : First this code: while(!fbus.eof()){ cin_string(carnumber,fbus);... (by keskiverto)
A question about string::iterator
void Encode_Message(string User_Input, const string Legend){ string Encoded_Message; string::iterator Char_Pointer; for(Char_Pointer = User_Input.begin();...
[4 replies] Last: About the range based loops... aren't I using range based loops? N... (by seeplus)
Read text file into a function.
I am having trouble with ifstream and reading from a file. Essentially, I would like to "open" the file, read the data into an array, display the information, t...
[15 replies] Last: @Fayezilla. Based upon your code, perhaps: #include <iostream> #inc... (by seeplus)
Grades Program switch statements
I was wondering what I have wrong here, i need a grade entered then a switch statement to display they got a A or B, etc. The program runs but when the grade is...
[6 replies] Last: You could also use an array to hold the mark/grade breaks. Something l... (by seeplus)
by berce
Recursive Function namely without using loop
Hi Friends, I have program the below code however I could not programming as recursive function and I want help of you //Example program #include <iostrea...
[1 reply] : For comparison: #include <iostream> using namespace std; void recur... (by salem c)
What happens when you press "enter" without providing the program input?
I tried googling this but found nothing but people wanting to gather input without the user pressing enter. When I provide a prompt for user input and the us...
[3 replies] Last: You can read the entire line of input with std::getline then test wh... (by mbozzi)
by maso
Make Dijkstra take input from text file
Hello, I am trying to change the Dijkstra algorithm to take input from the text file. I found this example ( fo...
[1 reply] : If I read this correctly you are asking others to invest time in amend... (by lastchance)
by Mif
I get some errors.. if anyone could help me "C"
I have follow some videos on youtube like to make a game in C from scratch.. all fine until I get this error: game.c|2|error: expected '=', ',', ';', 'asm...
[13 replies] Last: Hey I ain't mad at ya. Ask away no question is too simple if you're a... (by markyrocks)
Pointer length in C
Hello, Why output is 12? #include <stdio.h> int main() { int a = 5; int a2 = 6; //int* ptrNull = NULL; //int* ptrNull2 = NULL; char...
[16 replies] Last: VS only has the one compiler (cl). Whether it compiles as c or c++ dep... (by seeplus)
June 2021 Pages: 1... 6789
  Archived months: [may2021] [jul2021]

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