I am trying to implement the strcmp function to be able to sort a list of businesses, but i keep getting an error on the line where it's supposed to be comparing them.
void...
Type: Posts; User: Creatlv3
I am trying to implement the strcmp function to be able to sort a list of businesses, but i keep getting an error on the line where it's supposed to be comparing them.
void...
the error im getting is
g++ -ofinalprog planet.c input.c input2.c addplanet.c
addplanet.c: In function `double add_planet(std::vector<double, std::allocator<double> >&)':
addplanet.c:9: error:...
ok, like i said, i wanted to make sure that this idea would work before i spent several hours wasting my time just to find out that it doesn't work
I just want to know if this is possible, i do not want someone to tell me how to do it.
I am wondering if you can use vectors to store a series of information at a given time
ex)(my homework...
revised yet again, new code is
int j;
int i=0;
cout<<"cols="<<cols<<endl;
cout<<"rows="<<rows<<endl;
cout<<endl;
do{
j=0;
cout<<"Number at position...
i revised my code to
int j;
int i=0;
cout<<"cols="<<cols<<endl;
cout<<"rows="<<rows<<endl;
cout<<endl;
do{
j=0;
cout<<"Number at position "<<i<<","<<j<<" is ";
assuming cols=2 and rows=3
([0,0][0,1]
[1,0][1,1]
[2,0][2,1])
int i=0;
cout<<"cols="<<cols<<endl;
cout<<"rows="<<rows<<endl;
cout<<endl;
yea, that makes alot of sense, something which i knew, but was forgetting to use, thank you
i am trying to make a matrix, and gradually make it more complex, currently i am running into the problem of it not actually making the matrix.
#include <vector>
#include <iostream>
#include...
Ignore this problem, it has been fixed already
problem has been solved, thank you for the idea to take the char values at the end when i am displaying the information
ok, that makes more sense than what i was trying to decipher from the previous post, thank you
i am trying to make my program output values 10 or greater as the capitol letters of the alphabet, but i am having no luck, my code thus far is
void convert(vector<int>& rev_rems,int base,int...
I must apologize for wasting your time just now, i just realized that i am trying to use the character value references for calling the letters. A=65 to Z=90, i am NOT trying to convert to hex, this...
the 10 comes in from the fact that there are 10 single digit numbers (0-9), then the double digit numbers (10-99), at 10 is when the program would start using letters, A=10, B=11, etc., however to...
i could, however, i want to know how to convert it to the hex format before i condense them down, easier to follow what im doing, and then this way i can check to make sure that the answers i'm...
I am trying to make a program to change the base of numbers from base 10 to anything they want (from 2-36). the problem arises when i am trying to convert the numbers to a hex format. I have no...
sounds to me like you need to create a way to block all input except numbers from being entered, have you tried using a
if(cin.fail==1){} which will trigger if any letter is used to represent a...
i was trying to use it to calculate the mean and median of a set of numbers, however there was nothing in it, so it was never working. everything works fine on it now
i would, but im already using L in L_side for a different part of my program, and it was easier to keep things organized with just calling it list1
Thank you anon, i changed all my L's to list1 and that fixed the problem, i hate minor problems like that that cause major headaches
I have tried several times to make minor tweaks to the program, but nothing seems to work, i finally ended with
double Mean(vector<double> L)
{
double sum=0;
vector<double> list1;
...
are you trying to accomplish something like this
#include <string>
#include <iostream>
#include "input.h" //function prototype of double readDouble(string prompt, bool allowNegatives)
using...
The problem I am having is that it is not displaying anything other than the input feature.
the code is as follows:
#include "input.h"
#include <string>
#include <vector>
#include <iostream>...
I have to agree with NeonBlack here since i'm a beginner as well. Teach us the basics and how to get the code to do what we want with the easier stuff then gradually add more things to our database...