Beginners - April 2021 (Page 6)

How to pass toupper to a string in a 2D array
 
Hello, I'm working on an assignment and I'm having trouble with it. The instructions are to just use 4 libraries and they are, <iomanip>, <iostream>, <string>, ...
[5 replies] Last: Thank you everybody! It's always nice seeing the amount of different w... (by av16352)
Bool function
 
Need help with a bool function in which returns1 (true) if the class instance B is divisible by a base 10 integer x. Otherwise, it returns 0 (false). using name...
[5 replies] Last: IF that is what you need, then consider: #include <string> #include... (by seeplus)
Exception handling and Debug Assertion Failed Window
 
Greetings. I am learning about exception handling. The following code will give an out-of-range error. When I tried to execute the code, it pops out the "Debu...
[3 replies] Last: @OP, did you run the code in DEBUG mode in Visual Studio? In DEBUG mod... (by thmm)
by alexas
AxisAngle rotation reverse?
 
I have 3d objects which are translated at certain z from each other and rotated. The information of the rotations are saved in the vector as AxisAngle format: {...
[7 replies] Last: it's the same, when you add 180 to the angle, you get the opposite. ... (by keskiverto)
Array Error (1,2)
 
So I'm writing code that will prompt a user for the size they desire for an array, then I have to create an array of that size later i will have to loop aski...
[22 replies] Last: If you really want to use new/delete (you shouldn't), then: #includ... (by seeplus)
Create Alphabet from Array 2 dimensions
 
#include <iostream> using namespace std; main() { int arr = {{0,1,1,1,1,1,1,0},{0,1,0,0,0,0,1,0},{0,1,0,0,0,0,1,0},{0,1,0,0,0,0,1,0},{1,1,1,1,1,1,1,1},...
[7 replies] Last: #include <iostream> using namespace std; const int M_SIZE {8}; int... (by againtry)
Using Environmental Variables in Windows 10
 
This is a set up question. I have a beginner's book which uses the MinGW compiler. After installing the MinGW program I am instructed to add the path C:\MinGW ...
[5 replies] Last: Thank you everyone. I'll read up on batch files. (by Bill1266)
string error
 
hey! I am really new to programming, so please dont kill me if there are any huge mistakes hahahahahah. My question is, what should I do to fix the error: mai...
[1 reply] : goto is bad, very bad. You have no way to programmatically terminat... (by George P)
Unable to find the largest element in array using Dynamic Memory Allocation
 
So I've gone over my code and tried looking at archives but I'm not sure where I'm going wrong. When I use the following code, it gives me the largest index num...
[3 replies] Last: my code would not work setting it to nullptr for multiple reasons. f... (by jonnin)
!= function linked list
 
Hi, First time using both pointers and iterators. I am stuck on overloading the != operator for my iterator. I get segmentation fault when I use the one I trie...
[1 reply] : Line 26: How do you tell that two iterators are not equal? (by Ganado)
by batzot
i want to enter q to quit the and y to play the game again but im not sure what code to use. any suggestion??
 
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main() { cout << "\t\t\tWELCOME TO THE GUESSING GAME\n" ; cout << "\t...
[16 replies] Last: so thats the test cases? To answer your question, one way of looking... (by againtry)
Please help me with file I/O
 
Hello there, I am working on an assignment and the instruction is below. This fifth assignment will allow you to better explore the concept of File I/O wit...
[6 replies] Last: Perhaps: #include <iostream> #include <fstream> #include <string> #... (by seeplus)
file i/o loop
 
Hi! We're pretty far in this class now and we just did functions. For this assignment, we had to convert all of our last assignments into functions... yada yada...
[2 replies] Last: Thank you. My brain is not working right now lol! so simple! (by lelouch420)
fstream
 
If fstream is for reading, writing, or both, then what is the purpose of using either ofstream or ifstream? I have searched the articles on this site that give...
[3 replies] Last: why I would use ofstream or ifstream instead of fstream. To express i... (by Ganado)
Help with problem
 
Please note that this is not a homework site. We won't do your homework for you. The purpose of homework is that you learn by doing. However we are always willi...
[no replies]
SFML CANNOT FIND -LSFMLxxxx
 
Hi guys! I'm trying to use SFML to make a program. However I couldn't set up the SFML successfully. This situation drives me crazy. I'm using code blocks as...
[1 reply] : Assuming you're following this to some degree: https://www.sfml-dev.or... (by Ganado)
How to use 2D Arrays with different types?
 
I have this 2D array code that I don't really understand but can somebody tell me how to use both dimensions (NUM_MONTHS & months) in the same function, though ...
[9 replies] Last: are you still struggling with arrays to functions? here... #includ... (by jonnin)
by y19177
A question on sizeof
 
Trying to practice recursive function. Not sure why the expression sizeof(p) / sizeof(p ) cannot be used here. When compiling, it gives out "CH15.5.cpp: In fu...
[8 replies] Last: #include <iostream> int sumArray( int *p, int n ); int main() { ... (by lastchance)
cin.get() not calling anything + how to find info?
 
I can't understand this program what cin.get() is supposed to accomplish here? It is not calling anything! I googled it and found as only usage - to read ist...
[7 replies] Last: [quote=empleat] I don't have imagination, but I Am very creative If y... (by JRManx)
adding letters to a string
 
I am writing a program that can add letters to a vector then display all elements of the vector. However, once I add letters, the vector doesn't print out anymo...
[2 replies] Last: You mention letters (which are type char) but use type std::string?? ... (by seeplus)
April 2021 Pages: 1... 45678... 12
  Archived months: [mar2021] [may2021]

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