Beginners - March 2021 (Page 3)

Convert Bar to PSI prssure
 
how to Convert Bar to PSI pressure using minimum ram. i have a small ram micro controller with some bytes reserved. any short method in c lan 1 bar ...
[5 replies] Last: Just multiply by the conversion factor. It should be only 1-2 machine ... (by dhayden)
Using template to implement Singly Linked List
 
Hi guys, I start learning data structure now. About the code , the VS compiler give me this error : unexpected token '<', expected 'declaration' . Please hel...
[9 replies] Last: I got a new message from my teacher. Other student have the same issue... (by qtngmin)
by NiceS
Replacing int type variable in text file
 
Initially i have a structure array store all of the data from the text file. Now i want to checkout a tool from the text file how do i change the quantity of it...
[5 replies] Last: You can read in the whole file into say a vector of some struct, modif... (by seeplus)
by ra99t
std::isspace in the exemple on the std::istream::sentry page
 
I was running the example code on std::istream::sentry page and I didn't understand why std::isspace on line 17 doesn’t get out of the loop, since on the line...
[2 replies] Last: Now it makes sense. Thank you dutch! (by ra99t)
by bstroe
Add character
 
I want to make a function “addChars” that displays after each vowel "*" It must change the variable on call. EX: char s ; s = 'a'; s = 'n'; s = 'a';...
[1 reply] : Try: #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include ... (by seeplus)
how to blink multiple led in c
 
hi to all i am new in programming. i write a code in c. but problem how to multiple led blink in c /* * Blink - makes a single LED blink on and off */ ...
[5 replies] Last: ok thanks. i will try (by jack micro)
Graph problem
 
Hello, I'm having a very hard time solving this problem My work is to read from the text file, apply shortest path searching (BFS or UCS), and print out the sh...
[10 replies] Last: Never mind, I figure it out. (by NormalUser1234)
Need Help with School Coding Question
 
Hi all. I've been working on this problem for a week but just can't crack it. I'm very new to c++ and taking a class on it, and this is one of the questions. ...
[7 replies] Last: #include <iostream> #include <iomanip> #include <string> #include <ve... (by lastchance)
Skipping blank lines
 
Hello! I'm having troubles reading an input file that has three columns of numbers. Some of the values of the third columns are blank lines How can I make the ...
[3 replies] Last: Thank u! it worked (by panconcafe)
Help Understanding this code sample
 
I saw this on Stack Overflow and wanted to understand it a bit more. void Tree::insert(int data) { if(!root) { root = new Node(data...
[5 replies] Last: Nevermind, I've figured it out...it has to do with the ?: operator. Th... (by KittyIchigo1)
by NiceS
Trouble reading text file data
 
int readEmp(EMPLOYEE e , int size) { ifstream inFile; int numEmp = 0; inFile.open("employee.txt"); system("CLS"); if (!inFile) { cout << "Err...
[4 replies] Last: Use >> ws instead of .get() as .get() assumes only 1 white-space where... (by seeplus)
by bstroe
Turn uppercase to lowercase
 
I want to turn uppercase to lowercase and vice versa. Input: Acesta EsTe un SIR Output: aCESTA eStE UN sir but my code displays : aCESTA@eStE@UN@sir #inc...
[5 replies] Last: Flipping a C string's case using iterators, an algorithm, a lambda and... (by deleted account xyzzy)
abstract class
 
I am trying to declare in main() an object of class var1, yet an error occurs stating '' cannot declare variable 'q' to be of abstract type 'var1' '' also ...
[2 replies] Last: @coder777, thanks, will try (by MaxGreen)
Help with expected primary expression
 
I'm writing a code that calculates radius, area, and perimeter of a circle (the area and perimeter aren't done yet). My issue is that on line 63 when I call the...
[2 replies] Last: Consider: #include <iostream> #include <string> #include <iomanip> ... (by seeplus)
BST overload assignment operator
 
Hello everyone, I'm currently trying to implement an overload assignment operator for my homework. I'm not really sure where to start and the one that I've trie...
[6 replies] Last: Assuming that the copy constructor and destructor work OK, then assign... (by seeplus)
by chipp
what's the difference between \r and \n?
 
i have a simple testing prog to enter password with just display asterisks, just like the ordinary password functions this is the code: #include <iostrea...
[16 replies] Last: [quote=seeplus] For a background on ASCII, see https://en.wikipedia.or... (by chipp)
by ErikDz
'filesystem' is not a namespace-name
 
Why does it say filesystem is not a namespace-name?? #define _WIN32_WINNT 0x0500 #include <Windows.h> #include <string> #include <stdlib.h> #include <...
[9 replies] Last: @jlb, Yeah, I figured something like that. Guess I should start looki... (by JRManx)
by elsie
Error Message
 
I tried to write a program and I get the message "error on line 28"(its a 15 line program and it doesnt show the error). I also get the message "recipe for targ...
[1 reply] : Hello elssie, Please post the complete program that you are using. It... (by Handy Andy)
Not sure how to call a function with parameters in a function with no parameters
 
I'm writing a binary search tree project for school, and we have a "clear()" function that is supposed to help the destructor clear dynamic memory. We've be...
[1 reply] : You just call the helper from clear() with the root: clearTreeHelper(... (by dutch)
% not usable on double options?
 
I now understand % is not usable on double values, is there anyway around this because if I set the variable to an integer type my whole code messes up. ...
[1 reply] : Possibly https://en.cppreference.com/w/cpp/numeric/math/fmod But it re... (by dutch)
March 2021 Pages: 12345... 13
  Archived months: [feb2021] [apr2021]

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