Beginners - December 2021 (Page 6)

Having trouble with getting a correct value from my return function
 
Hi, I am having trouble with getting the correct return value from the function I have typed. The value seems to be larger than what it's supposed to be (like i...
[3 replies] Last: that makes so much more sense! I can't believe i didn't notice that i ... (by ssha422)
by jannin
String
 
Where is my mistake? #include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; int cnt1=1, cnt2=0; for(int i=0;i<s.si...
[3 replies] Last: [quote=jannin]Where is my mistake? (1) You haven't put your code in c... (by lastchance)
WinInet HTTPS Post Request?
 
I need to send data with POST method to a php page. The site has SSL (Let's Encrypt) Here's my code for HTTP Request LPVOID myMessage = (LPVOI...
[9 replies] Last: I'm not sure, but it's possible that "HTTP Debugger" intercepts the HT... (by kigar64551)
.
 
...
[2 replies] Last: Perhaps as a starter, something like: #include <iostream> #include ... (by seeplus)
by rin103
vector<> function whale_talk
 
I think I do not fully understand vector function. I don't know what's going on during for loops part in this code. #include <iostream> #include <vect...
[6 replies] Last: Thank you so much! (by rin103)
Simple stuff... for the life of me can't see where I went wrong
 
Hi, Trying to do the simplest of simple c++ project importing from a file, and loading the contents into a vector. For the life of me, I can't see where I've g...
[7 replies] Last: Okay, I'll give that a try. Many thanks. (by Thunderchook)
Across Apps and Sites.
 
For my class work assignment, I had to write a code that has two functions and an array that does the gathering of the grades and averages them. I have done eve...
[3 replies] Last: good eyes. ^^ (by jonnin)
Question about memory management and pointer owernship
 
Hello everyone, I am trying to comprehend the concept of how pointers know who they are pointing at. For an example let's choose the stop and copy method used...
[5 replies] Last: I am trying to comprehend the concept of how pointers know who they a... (by jonnin)
Code completely ignoring my if statements
 
My aim with this program is for votes to only be recorded if the value is any number from 0 to 4 and to continually loop until a negative number is input. The p...
[1 reply] : Be aware that, for a "while" loop, you need either: while(condition) ... (by kigar64551)
by sito20
Displaying an error message using IF statement
 
Good Day, I'm writing a program that prompts the user for two integers, and then proceeds to print the numbers in that range. However, I would like to have it ...
[7 replies] Last: Salem C, Alright, thank you. I'll work on these conventions now, early... (by sito20)
by Durin
Competitive mathematics C++ sources
 
Hi everyone, I am preparing for a C++ exam which will include tasks like: How to check if any number is dividable by 16 without using / and % operators. ...
[5 replies] Last: bool isDiv16( int n ) { return !( n & 15 ); } (by lastchance)
by jlb
Isstream & ofstream.
 
Are you sure the input file contains the correct data? Have you checked if the input file is even being opened correctly? Your current code doesn't seem to gi...
[2 replies] Last: After ifstream(), add something like: if (!fin) return (std::co... (by seeplus)
Multiple input/outputs.
 
Hello, with me is an assignment where am to create a code that can receive 10 grades and then give a grading letter attached to it accordingly as an output. I h...
[2 replies] Last: Do you mean something like this: #include <iostream> constexpr siz... (by seeplus)
Void * func(void* arg)
 
I need to understand the meaning of the following function. To me I think I think It means that the data type that is being passed is unknown and it will return...
[4 replies] Last: Passing arguments as void* is used in MPI all the time - but you have ... (by lastchance)
I can't solve make a sort of strings
 
#include<bits/stdc++.h> using namespace std; int main(){ string s,t; cin>>s>>t; sort(s.begin(), s.end()); if (s==t) {...
[3 replies] Last: I think I'm with @ne555 here. @nurrun1, please state your ORIGINAL pro... (by lastchance)
Recursion
 
Hello, I have been disturbed by the fact that I can’t make my program do a reading of the recursive search. Any time I enter above or below the limit, the pro...
[1 reply] : Please use code tags when posting code so that the code is readable! ... (by seeplus)
Error codes.
 
Hey guys, am currently being kept busy by a specific problem that has been so hard to solve. My question goes like this: Make a design of an algorithm that ca...
[2 replies] Last: > C2676 - binary '>>': 'std::ostream' is the error code that am receiv... (by ne555)
using additional header and implementation files in a project with ‘header-imp-class’ configuration.
 
My project is making use of a C++ file in the main function. I also have a header that am using in declaring the class with its member functions and the fields....
[1 reply] : > Header.h 5 Since line 4 would seem to be #include "House.h" havin... (by salem c)
Visual Studio very strange "hello world" error (1,2)
 
Hi! I've just installed Visual Studio Community 2022 witch C++ package (not everything, just 4GB). Tried the welcome "Hello World" program and it worked then,...
[33 replies] Last: TEST1 (as a global variable known at compile time) and TEST3 (by manda... (by lastchance)
Formatting a 2d array output
 
Hey yall, so this is one of the last things I should do for my project and I can't seem to come up with a good idea for it so I thought I would bring it here. I...
[3 replies] Last: Thank you AbstractionAnon, your idea worked, I also had to remove the ... (by dorito200)
December 2021 Pages: 1... 4567
  Archived months: [nov2021] [jan2022]

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