General C++ Programming - October 2017 (Page 14)

File IO
 
i have this problem, i need to display the maximum, the minimum and the average of this data and display the results in another text file. 1 1000.25 ...
[2 replies] Last: You should probably work on your function names. You have a function ... (by doug4)
by lul
need help with mutual dependent class
 
// file directory.h #ifndef ENTRY_H #define ENTRY_H #include<string> #include<vector> class Directory; class Entry { public: Directory* parent; ...
[3 replies] Last: The contents of // file directory.h and // file entry.h ARE IDENTICAL ... (by keskiverto)
Maximum and minimum using mathematical formules.
 
Hey guys .. I need some help.. I need to find the maximum of two numbers using mathematical formules. I found two of them : ((a+b) + abs(a-b))/2; and int(a > b)...
[5 replies] Last: max = (int)(a/b)*b + (int)(b/a)*a); this won't work if equal. Not ... (by jonnin)
Input of String not working..
 
#include <iostream> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <ctype.h> using namespace std; int main() { char str ; cout<<"E...
[4 replies] Last: Thank you so much. I got it.It works now. i actually understood that. (by NotoriousProgramer)
Error in array in structure
 
The below given program shows the following error: incompatible types in assignment of 'const char ' to 'char ' What does this error mean ? Why is it coming...
[5 replies] Last: long int rollno; In the widesweep of things, avoiding problems with... (by closed account 48T7M4Gy)
Looping question
 
Use input statements to retrieve any number of real values from the user and then calculate and display the average of the numbers entered. I don't have any ...
[2 replies] Last: Thank you!! (by Gryphonx)
Help with SMFL
 
I can't figure out which compiler version I'm supposed to be using for SFML on Visual Studio 2017. If someone can help me out I'd appreciate it. (sorry if this ...
[3 replies] Last: Using VcPkg https://blogs.msdn.microsoft.com/vcblog/2016/09/19/vcpkg-a... (by JLBorges)
I keep getting an error
 
i keep getting this: ' "c:\Users\Mariana\source\repos\Project3\Debug\Project3.exe" ' is not recognizable as an internal or external command, operable program or...
[2 replies] Last: you need to add int in front of main() It seems you are using Visual S... (by Thomas1965)
Writing a function to get the Prime Numbers between two numbers.
 
Hey everyone! So I am in my first c++ class and am starting to hit the part where I'm struggling to really grasp everything. For a small project we have to wri...
[6 replies] Last: algorithm ideas: the sieve algorithm is well known and oft-used. It ... (by jonnin)
DOS: High Intensity Background Color
 
So I’ve been trying to find on how to set up the VGA text mode to change the background blinking bit to the color intensity bit. Is there a way to do this? N...
[8 replies] Last: turbo predates much of the current standard by decades. And it was ... (by jonnin)
Storing a value obtained in a loop and using it in the same equation to get a result
 
For example if I am using the equation [(x/y)+y] / 2 = z How would I store the value of z in a for loop and use the value of z, for y in the same equation, p...
[7 replies] Last: I did indeed mean what you note, @doug4 ! Thank-you very much indeed... (by lastchance)
by Borneq
Shared library and smart pointers
 
From other forum - is possible returns smart pointer between DLL,.so method boundary. Table *soGetTable(Client *client, char *name) { // return client-...
[1 reply] : From other forum - is possible returns smart pointer between DLL,.so ... (by coder777)
by juvan
Confused (const std::string& str)
 
The title is non descriptive and maybe misleading but let me explain it here. First the code: #include <iostream> #include <string> struct S { const std::s...
[2 replies] Last: Thank you for the reply. I found out that the reason why it worked, is... (by juvan)
Any Takers?
 
This code was supposed to read and write to a file the total votes, either Y or N, for each individual district and for the overall total of each vote. Problem...
[2 replies] Last: your code properly indented #include <fstream> #include <iomanip> #in... (by ne555)
Doubt in character array
 
Output of the below code is raman srinivas srinivas raman What is the logic behind the output of &names being raman ? Shouldn't &names [0 ] print the ad...
[7 replies] Last: Understood. Thanks all (by abcdef123)
What is a good way to store the computation of the distance into a matrix?
 
Hi, So I'm working on a search algorithm, however, we were asked to compute the distance between the nodes(points(x,y)), and once the distance is computed, the...
[6 replies] Last: If you just need shortest distance, then the sqrt is unnecessary befor... (by keskiverto)
Finding
 
Need help finding the basic operations and analyzing this program. Do I count the *= as the basic operations. What is the ipower() doing in concise English? ...
[17 replies] Last: Here is what I have so far: (by closed account Sz6592yv)
Programming
 
int main() { int x; cout << " Please choose between number 1 or 2 " << endl; cout << " To ente...
[3 replies] Last: Thankyou so much ! I find it really helpful :) (by programnick)
by EgorV
enumerations class
 
Hello, How I can declare the enumeration class as an interface and a realization in this situation: namespace Menu { //errors class WrongInPut {}; ...
[4 replies] Last: The MicVisStudio out to me: there is an error, but now I looked at my ... (by EgorVv)
algorithm to code help
 
function FIND SHORTEST PATH(Grid world) q<-new Queue; s<-new Stack; Initialise a Distance array of NumRows by NumCols to MAX.INT; Distance <-0; ...
[2 replies] Last: ohk i won't do it (by Teballo)
October 2017 Pages: 1... 1213141516
  Archived months: [sep2017] [nov2017]

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