Beginners - September 2021 (Page 6)

BitBlt Error After Many Iterations
Hey guys, I've ran into a bit of a snag... The program I'm writing captures a portion of my screen, stores it in memory, grabs pixel data from memory, then ref...
[3 replies] Last: Line 16: Instead of DeleteObject(hBitmapOld); you should SelectObje... (by coder777)
cout is not working
even after using namespace std cout is not working #include <stdio.h> using namespace std; int main() { int martialarts(int arr ,int arrSize){...
[5 replies] Last: even after using namespace std cout is not working It might help yo... (by George P)
Displaying an Image
I am trying to create a console controlled program, that receives an input command, creates a window and displays a .bmp picture in the window, and then is clos...
[9 replies] Last: You know... I almost hate to suggest it... but you could blow people... (by Duthomhas)
I need help writing a dice game code
Rules of the Game:1- Randomly roll the first dice once(six-sided dice). 2- Randomly roll the second dice. 3-Compare first and second dice. a. If they are e...
[3 replies] Last: How far have you got in learning C++? What don't you understand? What ... (by seeplus)
by dizzie
unexpected output
hi, this program executes fine but the output isn't what I want. for some reason, my if and else statement is not executing. This is the question: "(Fluid Me...
[5 replies] Last: You might be better with a database-type solution. Your viscosities a... (by lastchance)
Exiting Threads Closes Main Thread?
Hi everyone! New to the forum and I haveta say that there's a wealth of knowledge on here that has helped me GREATLY so far... Anyway, I'm very new to C++ and...
[11 replies] Last: Thanks everyone for your responses. I'm rewriting the program in a lin... (by DoktorD1313)
c++ beginner - use loop for odd/even number (1,2)
This is the description of the prac im doing. The code below is what I have come up so far. I also attached the pseudocode as well. And for me it's confusing so...
[20 replies] Last: I never noticed the alias thing, good catch. (by jonnin)
Help with code
Can anyone help me with this program I am kind a stuck, I have no idea what I have to do or where to start with because my tutor did not show me how to do this ...
[4 replies] Last: An alternative way to handle the times after they are parsed is to con... (by againtry)
by AkiraC
How to perform array frequency count?
Hi, I need to write a program to read, group, and total up the survey marks entered by a respondent. I need to use an array to store the frequency counts and I'...
[17 replies] Last: Well, I suppose that on the internet you can offend anyone with anythi... (by Duthomhas)
by ng1865
How to incorporate pointer notation
I would like to remove all white spaces in a string from a code sample so that way it can print out as a character array. However, I need to approach this by us...
[7 replies] Last: #include<iostream> void trimSpaces(char *str, int length) { int ... (by againtry)
by ng1865
Explaining pointer notation
I need to remove all white spaces in a string from a code sample so that way it can print out as a character array. However, I must approach this by using point...
[2 replies] Last: Duplicate of (by seeplus)
Is there a more efficient way of comparing multiple elements of an array?
for example, if I wanted to check if int Array [0,1,2] were equal to 5, 3, and 6 respectively, (data is redundant) what I would use something like this: if (...
[10 replies] Last: "efficient"   • Efficiency has little to do with how small your co... (by Duthomhas)
String Processing Delete between two characters
Hello all, I am currently working on string processing because I have not learned it. I have a string = <html><p>Hello < / P>. I am simply trying to remove a...
[1 reply] : #include <iostream> #include <string> using namespace std; string st... (by lastchance)
by Geckoo
Create a new Thread
Hello. I am trying to create a thread so as to manage some delay inside a process. I tried with Sleep and Thread, but it freezes my project because it blocks th...
[11 replies] Last: I would like to avoid complex threads independently. I would like to d... (by Geckoo)
Struct Functions
Hey all, needing a little guidance here. SO were supposed to use 2 functions. One funtion to take input, and return a struct datatype. And one function to outpu...
[1 reply] : Hi, On line 25, your input starts at 1 and ends at 3. The array start... (by TheIdeasMan)
stl sort function
I am going back over older code that I had written before and I have noticed something that I dont actually understand. Code below. How is the sort and compare ...
[2 replies] Last: The function you pass to sort should return true if its first argume... (by mbozzi)
Program to drop lowest score and calculate average.
I have already started the program, the only issue is that I cannot get it to work. How can I improve my code? Prompt: Using the C++ while loop or the do – ...
[5 replies] Last: @lastchance my bad, I meant to say I got stuck in an infinite loop. (by gigacapybara)
c++ beginner - read 10 integers into an array
hi guys. i got the description of the prac im working but i cant seem to figure the solution. i also have attached the pseudocode and my code below so i hope it...
[2 replies] Last: thank youuuuuuuuuuuuuuuuuu (by bloshanova)
Segmentation fault when working with binary file
HI guys, doing something that I've done countless of times but nothing looks amiss to me yet I'm still getting a seg fault. *sorry about the debugging prints ...
[6 replies] Last: As C++17: #include <iostream> #include <fstream> #include <vector> ... (by seeplus)
Good practice for this two scenario
hello guys! I would like to know your opinion about what is better (or good practice) for these 2 samples below: 1) Is it better to make menu option as func...
[2 replies] Last: I will even go so far as to say that exit()/terminate() and so on shou... (by jonnin)
September 2021 Pages: 1... 4567
  Archived months: [aug2021] [oct2021]

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