They are declared. I think there may be a syntax problem that I can't seem to find after staring at that block of code for 15mins.
Type: Posts; User: otchster
They are declared. I think there may be a syntax problem that I can't seem to find after staring at that block of code for 15mins.
I wrote this function for displaying a matrix, but it won't compile..
What am I doing wrong?
void display(int A[] [], int m, int n)
{
for (i =0; i< m; i++)
How many numbers do you wish to input?: 9
Number? 12
Number? 23
Number? 45
Number? 4332432141
Number? 34
Number? 23
Number? 12
Number? 9
Number? 2332432145254325325
Thanks everyone, my program now fills an array to the amount of the users preference, to a maximum.
The next step is to have the user input a number, search the array, and then respond with an...
I wish to go the route of a maxinum array..
#include <iostream>
#include <string>
#include <algorithm>
int length;
int list[100];
I am new to C++ and I know nothing about vectors, etc.. Also, I haven't been taught anything about them in my class, so I'm guessing that they shouldn't be required to code the program I am trying...
Im having trouble figuring out how to take an int input from a user and create the array with that amount..
#include <iostream>
#include <string>
#include <algorithm>
int length;
int *...
I am familiar with basic arrays...
int list[50]
Creates an array named list, that is 50 long.
How do I go about coding an array that is the length that the user inputs?
I thought about...
#include <iostream>
#include <string>
std::string string1; //First string
std::string string2; //Second string
int main()
{
Ok, when I try to use substr, heres what I get:
#include <iostream>
#include <string>
std::string input1; //First string
std::string input2; //Second string
int length;
Heres where I'm at...
#include <iostream>
#include <string>
std::string input1; //First string
std::string input2; //Second string
int length;
std::string crop; //Second...
First off, thanks everyone for their input thus far..
Heres how I want to handle this..
Two strings are inputted, I need to see if the first string begins the second string (hell, hello = true)...
Ok, got it. I knew I was interpreting it incorrectly.
What control statment is reccommended to search a string for another string??
Heres where I am at:
#include <iostream>
#include...
I am using O'reilly's Practical C++ Programming book in its 2nd edition. I have to create a program to complete the following question:
Write a function begins(string1, string2) that returns true...
Thank you so much, your post totally made me understand what I wasn't. Take care.
Hey everyone, this is my first post in some time.. I need to create a simple C++ program that will count the number of words in an inputed sentence. I will admit that I am completely lost on how to...
could i see an example code. the excerpt is confusing me. thx
im not sure how to understand this. the assignment called to incorporate the different sorts and record the times it took to sort the data.
In my class we are learning about different sorting methods. Im kind of confused about all of it, and the fact that functions still confuse me dosen't exaclty help either.
We have the code...
i think this program is right, but i cant figure out why its not working.
#include <stdio.h>
#define SIZE 10
double number[ SIZE ];
Well my fault, I assumed this was a help message board, one that helps one in need. Not a board where people say "nope, thats wrong" and give no help or examples, and then proceed to tell me to do a...
hmm, check what I did. Is this any closer?
#include <stdio.h>
int main()
{
FILE *afile, *anotherfile;
int number;
Will you please show me an example on how to incorporate getc and putc. All I can think of is how i presented it, similar to scanf and printf. I am referring to a text that dosen't show a good...
the below is still throwing errors.
#include <stdio.h>
int main()
{
#include <stdio.h>
int main()
{
FILE *afile, *anotherfile;
int number;
afile=fopen("fun-with-numbers.txt","r");
anotherfile=fopen("more-fun-with-numbers.txt","w");