Beginners - March 2018 (Page 26)

by Gore7
Vector of pointer within Vector Pointer
 
Write your question here. Hi everyone i just want to know for sure if u can do a Vector of pointer within a Vector pointer, example( std::vector<std::<in...
[1 reply] : > i just want to know for sure if u can do a Vector of pointer within ... (by JLBorges)
Functions issue
 
Hello everyone, I'm practicing using functions and I'm having a hard time figuring out why I keep getting an error for my code. In my double cylvol and double s...
[2 replies] Last: haha man I am noob. Thanks! (by primera89)
Program not recognizing getchar() command?
 
So this has been an issue for months, neither me nor my professor nor my classmates understand why its happpening. we use Visual Studio (latest version) and ...
[2 replies] Last: I was writing a long thank you thing, but before submitting I clicked... (by sciman777)
Output is blank
 
My goal is to write a C++ program that can read a text file and: * Count the average number of letters per sentence (the sentences end with ., ! or ?). * Count...
[1 reply] : while (current && '.' || current && '!' || current && '?') //c... (by kbw)
Having trouble creating
 
Hi all, With the code I've written so far, it is able to add subtract, and separate functions from either input or being read from txt files. I was able to do ...
[no replies]
const variables in constructor
 
hey guys I have a const variable in my year class and I want to initialise it when the class is created but for some reason when I try this I get an error is...
[3 replies] Last: You seem to be almost there: #include <iostream> class Year { pu... (by keskiverto)
returning a reference
 
Hey guys sorry about the influx of questions today,this is my third I have been studying all day anyway one thing that has always kind of confused me is when...
[1 reply] : Address is not reference. What do you actually want to return? * A ... (by keskiverto)
Error when linking libraries.
 
This is my first time using libraries in C++. I'm trying to use the SDL2.0 library in visual C++ but I get an error when trying to include a header file. "err...
[2 replies] Last: Thank you it worked! (by Pomidor)
Writing a function that iterates through an array
 
My program is supposed to read in data from a .txt file and print out an extensive data analysis. I've accomplished the first task of reading in the file and pr...
[no replies]
No type name ERROR
 
Hello, I'm having some issues with using templates with multiple classes. Below I have my code. I have taken out most of it that is not causing any problems. ...
[3 replies] Last: I'm not sure that's how you use templates, but you should try to use s... (by benhart)
How can I make an object be treated like a string (example inside)
 
I was looking over a custom string class (we'll call it String) the other day and I encountered the following feature: void func(String s){ cout<<"Th...
[1 reply] : What makes this work for std::string is the non-explicit const char* ... (by Peter87)
How to check if there is any character in a string?
 
May I know if there is a way to check any character in a string? I tried isdigit() for a string but it doesn't work ... Thanks in advance!
[6 replies] Last: Wow. thank both of you very much! (by hooi1997)
operator overloading an enum
 
hi guys just wondering if it's possible to overload operators for enums? the code actually compiles fine so it lets me overload the ++ operator BUT in main whe...
[2 replies] Last: thanks Peter,I thought maybe it wasn't possible to overload enums, (by adam2016)
Error Handling
 
Hello, I have a project I'm working on for a computer science class and this is the first time I'm dealing with bad data in an I/O file. The input file has six ...
[2 replies] Last: This kind of error is a result of high complexity within the code. I'd... (by benhart)
cout on one line?
 
got the following code, but it prints out on multiple lines, I want it all on 1 line if possible. If I remove endl from second line, it wont compile, any way a...
[1 reply] : #include <iostream> #include <string> #include <vector> #include <alg... (by JLBorges)
by Vinz24
need help in getting the value of a varriable in 1 function ro be used in 3 other function
 
i am making a turn-based rpg game with inventory. i want that in main page of the game(option to start the game, go to shop, credits and exit the game) will sho...
[3 replies] Last: The output should be like this: We... (by Vinz24)
Class Inheritance questions
 
Hello everyone. I'm messing around with an inventory system for a console game, and have gotten pretty close to what I need but am running aground on some finer...
[7 replies] Last: Using inheritance this way may affect your code in a bad way, problem ... (by benhart)
Line 11: Statement has no effect [-Wunused-value]
 
Write your question here. #include "P:\C++\Exercitii si Drills\Drills\pg . 75\std_lib_facilities.h" using namespace std; int main() { vector <int> pr...
[1 reply] : line 13: on for loop, for( numar = 0 ; numar <= 100 ; ++numar ) {... (by ar2007)
Avast keeps interrupting my programs?
 
Sorry for this super noob question, but my antivirus keeps interrupting my programs, and it might be for a dozen seconds or so but its highly annoying. I'v...
[2 replies] Last: Thank you for the reply, but under exceptions it needs an exact locati... (by sciman777)
by Yeyk
trigonometric identities
 
I need the user to enter two angles in degrees in the following way: x + y or x-y. and verify through ANSI C program the following trigonometric identities for...
[1 reply] : what warnings? What do you want to know? I personally would make a R... (by jonnin)
March 2018 Pages: 1... 242526272829
  Archived months: [feb2018] [apr2018]

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