i change it to this
int cnt = 1;
for (int i =0; i <len; i++)
{
for (int j = i+1; j<len; j++)
{
if (!strcmp(array[i],array[j]))
++cnt;
}
Type: Posts; User: nicz888
i change it to this
int cnt = 1;
for (int i =0; i <len; i++)
{
for (int j = i+1; j<len; j++)
{
if (!strcmp(array[i],array[j]))
++cnt;
}
when i do that i get
BILL 5
BILL 6
BILL 6
JACK 4
JACK 4
KEN 2
KEN 2
MILO 1
#include <iostream>
#include <cstring>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;
void checkDouble(char array[100][20], int len);
int main()
{
char strngs[100][20]={"BILL","BILL","BILL","JACK","JACK","KEN"};
checkDouble(strngs,6);
}
void checkDouble(char array[100][20], int len)
{
can someone please show a example of how i can delete a record completely. thanks
anyone?
Sorry, this is going to be a very long post :cool:
first of all,here is my codes:
Header File
struct hardware
{
int record;
i kind of fix the concat string issue i had, now can you help me on the "bill" issue?
ok i put the namespace after the #include.
i notice that i can change both line 20 and 21 to
strcat_s(string, " ");
and
strcat_s(string, temp);
that will get rid of all the warnings.
and the result is the same.
but my "bill" is still...
i updated the code.
not sure what you by the std::string, can you give a example.
// Stopping input with an empty string
#include <iostream>
#include <cstring>
using namespace std;
int main()
{
int i = 1;
char temp[80];
char string[80]; // room for 255 strings
sorry if it is asking for too much, can you show me where i need it fix it more in depth?
sorry i didn't post the question quicker, it took me a while to type it.
here is what i want it to do
1)choose a function and then enter two number for interval boundary.
2)unless user enter two 0, it will keep asking for two "new number" to as the interval and display...
#include <cstdlib>
#include <ctime>
#include <iomanip>
#include <iostream>
using namespace std; // prototype and name space declaration
int sqr(int);
int cube(int);
int fourth(int);
int...
thanks
when i do that it will look like this
sample output and input
Enter 0 to end
Enter a number: 2
Enter a number: 5
Enter a number: 6
Enter a number: 8
Enter a number: 0
0
#include <cstdlib>
#include <ctime>
#include <iomanip>
#include <iostream>
using namespace std; // prototype and name space declaration
int sqr(int);
int cube(int);
int fourthPower(int);...
#include<iostream>
using namespace std;
void reverseInput();
void main(){
reverseInput();
}
void reverseInput(){
i need it to be in Descending order.
1) i try to used tab but it just doesn't work. sorry.
2) i will print the number at the end.
3) i am very confused on the recursive function, can you provide me with a example or help me started it...
that is what i am stock on. can you help me start it off. thanks.
int main() /// main function
{
numOrder();
}
int numOrder()