General C++ Programming - April 2020 (Page 7)

char array and pointer (1,2,3)
 
So I made a char array and I have to make a pointer. The pointer moves through the array to print out a line of text. I need to make a for loop for this. How do...
[54 replies] Last: Indentation helps to see scopes . Braces, {}, around the only state... (by keskiverto)
Please help: C++ Stack Implementation Code
 
I need to write the code for getLength, isEmpty, and peek. I am unsure of what to write since I have never done this before. Also, I need to write a loop in ...
[3 replies] Last: bool isEmpty() { if (length == 0) return true; else return false; } ... (by thmm)
Is learning C++ recommended for beginners?
 
I have heard a lot of people saying C++ is a hard language to learn and is not a good language to start. I myself am a beginner in programming and have jumped s...
[2 replies] Last: Learning to program is like learning to drive. You don't start in a h... (by salem c)
by Slee p
Reverse string using stacks
 
Hello, I am unsure where to begin in my int main file. I am trying to store a string and print the string backwards using stacks. I need help in my main functio...
[1 reply] : I wish I had extra space in my sleep. Your code is incomplete and no... (by Duthomhas)
split time reference point
 
hello. I am working on a project that displays a weight calculator using reference points: #include <iostream> #include <iomanip> #include <string> using...
[7 replies] Last: thank you for the help I was able to figure it out (by staycoding12)
Tic-Tac-Toe MiniMax Algorithm
 
Hello I am attempting to create an unbeatable Tic-Tac-Toe game using the MiniMax Algorithm. I keep running it to issues with my code. My MiniMax algorithm appea...
[1 reply] : //******************************************* // Definition of Min_... (by Wsaint1990)
by prc27
Handling messages from an external file/library
 
I've written a library (functions declared in a .h file and defined in a .cpp file) and I'd like to call its functions from a main program (main.cpp). A functio...
[3 replies] Last: Is this the correct way of doing it? No. You should use a callback f... (by dutch)
C++11: undefined reference to static class member
 
Hello, (preview not working for me, apologies if this comes out misformatted) What is wrong with this? // test.h #ifndef TEST_H #define TEST_H void a (in...
[2 replies] Last: Hello Ganado, Thank you for your reply. Indeed, shortly after posting... (by f9d0ckl)
by kt992
Arrays and function problem
 
An engineer keeps an inventory of car parts, but on paper. The usual operations on his ‘inventory database’ include adding new parts, updating levels of ...
[3 replies] Last: The size of the array is not automatically transferred to the function... (by Merch)
How to access non static class members inside static method of the same class
 
I have a class with method send which will use curl to send something and handlehdr is the callback function for receiving the headers. curl_easy_setopt doesn't...
[2 replies] Last: Actually i have another structure which holds some info as HEADERDATA,... (by Scarletpimp)
IEEE 754
 
So I'm currently working on a project where I'm supposed to convert numbers into IEEE 754 single precision. So far, I'm stuck. I'm trying to figure out how to...
[4 replies] Last: https://stackoverflow.com/questions/36960456/how-to-convert-hex-to-iee... (by George P)
logger for c++
 
i am writing a logger class in c++ i want to redirect all the logs from different files to a function which decides where to write the log. for example, f...
[10 replies] Last: i'm really new in c++, but i think have an idea for the "logging" proc... (by BlakGerry)
Pointer Question
 
I'm working on a pointer question on HackerRank.The objective is to add and subtract two pointers. I am a little confused on why my *tempA is storing my sum. ...
[3 replies] Last: You need to process the subtraction before you change one of the point... (by coder777)
string stream help
 
how would you write a string stream from multiple txt files to change key words from each array? I'm sorry if my wording is bad i am very new to this and just t...
[6 replies] Last: If I interpret what H4X0R46 is saying correctly, then given the Colo... (by dhayden)
pointers and char functions without c++ library (1,2)
 
I'm a little stuck I'm trying to print an array backwards among other things. Here is what I have: /******************************************************...
[30 replies] Last: I got some errors on the for loops. And those errors might be? Copy... (by George P)
passing a reference variable
 
I have a function and code here void divideWithRemainder(int a, int b, int& q, int&r){ q = a/b; //quotient of integers r = a%b; //remainder } in...
[3 replies] Last: thank you so much for the feedback (by staycoding12)
by StacyG
C++ Problem Solving Scenarios - Urgent Help Needed Please
 
1. Write a program that asks the user to input an email address. Check whether the email address is valid or not. The conditions to be checked are: • Email...
[13 replies] Last: Thank you for your suggestions. Will do some more reading to better un... (by StacyG)
Find Line Substring
 
I have a TextFile which is full of junk lines. Lets say it looks something like this [File/Name/{123-321-123}] sjf2ij14ask1365t 421ij412y325sd 531v4ac4sdas6t4...
[6 replies] Last: But only works if I use StringStream not with Ifstream. What do you ... (by keskiverto)
dumb question
 
Is <cstring> considered using the C++ library string? I think I may have messed up.
[5 replies] Last: :( thanks for the info. That hurt lol (by Cjigsaw)
April 2020 Pages: 1... 5678910
  Archived months: [mar2020] [may2020]

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