Yeah I know thats true, I realized that and tried to fix it by moving the size-- into the else statement but that messed everything else up, I'm not to sure how to fix it.
Type: Posts; User: cloudstrife910
Yeah I know thats true, I realized that and tried to fix it by moving the size-- into the else statement but that messed everything else up, I'm not to sure how to fix it.
Nevermind I fixed it, I used this code:
string *deleteEntry(string *dynamicArray, int &size, string entryToDelete)
{ int stop;
// create a new dynamic array 1 element smaller than dynamicArray
...
Thank you, I now changed the code of that function to this:
string *deleteEntry(string *dynamicArray, int &size, string entryToDelete)
{ int stop;
// create a new dynamic array 1 element...
Hey Im working on this program for school, pretty much I have to create an array of five strings and create and use two functions, addEntry and deleteEntry. These should allow you to change the size...
oh wow thank you, I did that. It wasn't opening correctly. I just assumed it was opening correctly cause the compiler didnt tell me. There was actually and underscore instead of a dash in the file...
What do you mean? How would I do that? Sorry I'm pretty new to this.
I want to just take these numbers from the file one by one and assign them to different variables. I tried this just to see if I could get one to work and a get a crazy random number when it should...
nevermind I called the function completely wrong. It should have been:
merge(input1,input2,output);
I need to take two files with a list of ordered numbers in each of them and output them, combined, to another file in order.
This is my code so far:
#include<iostream>
#include <fstream>...
This code is supposed to calculate and print out the temperature where the temperature in celsius is the same in Fahrenheit. So it should print -40 but instead it prints nothing. Please help.
...
also that extra comma wasn't in my original code
#include<iostream>
using namespace std;
int main() {
int num=3, checknum, remainder, answer=1;
do {
checknum=2;
while(checknum<num-1) //check if the number is...
Im sorry lol, I just copied and pasted it here, and it came out like that. I've never posted here before and I'm pretty new to programing
I need to make a program that prints all prime numbers between 3 and 100.
Here is my code so far. Right now it only outputs the number 3. What is wrong with it? Thanks for any help.
...