hey guys I am trying to code a template for my main program but I am having a difficult time doing it.
I am make a template called Array that manages a 1 dimensional array of contiguously stored...
Type: Posts; User: Thegame16
hey guys I am trying to code a template for my main program but I am having a difficult time doing it.
I am make a template called Array that manages a 1 dimensional array of contiguously stored...
so for example when c=ca[i] is happening, it is passing in the memory location of the 4?. And at that point I just have to realize a swap is happening because I won't know the actual values of the...
hey guys, I have 2 programs I am trying to figure out and the generic void pointers are really throwing me off. I realize the values are being swapped in the function but I don't understand how a=4...
basically what I want to do is take that swap function and make it happen 1000 times. I believe if I do that I should get a time value. I tried replacing n with 1000 but then it would just mess up...
is there anything i can change so i can get a time?
Hey guys i am doing a basic swap program with generic pointers and I am trying to time it but I keep getting 0. Any idea why?
#include <iostream>
#include <iomanip>
#include <ctime>
hey guys,
I was going through some code and I was just wondering what is going on it.
char *s1,*sE;
//*s was a char passed in
hi guys i am having trouble with a walk through. The part i am having trouble with is the c_lang class print function. I don't understand what str[shift] = str[shift] - (x - '0'); is doing....
the file is separated by spaces and the file is only a prefix table it does not contain actual isbn. In the case above the area would be 88 and 00-19,200-599 etc is the range the publisher number...
2 that are really messing me up are 0003194876 and 9972000001
The answer should be
area:0
publisher:00
title:3194876
2nd one
area:9972
publisher:00
title:000
2 that are really messing me up are 0003194876 and 9972000001
The answer should be
area:0
publisher:00
title:3194876
2nd one
area:9972
publisher:00
title:000
i did something like my code below. As you can see some will be wrong like checkarea2,3 and 4. Now I was thinking if could do a count on the incorrect 1's to check if there incorrect and if they were...
thanks so much for all your help.
I just have 1 more question with the leading 0's. When Im checking my sin for example 0003194876 and how I would want to check it would be putting this string...
thanks so much for all of your help. I will just briefly describe what I want to do. So i have the char str which has my ten digit isbn. I made and int variable for each of the test pieces like...
Thanks for the information about this function but I am running the program on a linux machine using cstdlib and it doesnt appear to work. Is there any other way to deal with the leading 0 and also...
ok i still wasnt able to figure out the leading 0 problem but other than that I think im ok.
I just have one more problem. I have now figured out the pieces that will go in the area, the...
thanks for your suggestion. I just have a problem when I convert with the -'0' its not printing properly. For example if the ISBN "9070002043".
I would want to check if the area is 9. The the...
so str[i]-'0'?
What would that do. I am sorry I am new to this and not really sure what your getting at.
Hi guys I am trying to decode an isbn. My function looks like this:int decode
(FILE* fp, const char str[], char area[], char publisher[], char title[]); This function gets a file pointer that...
so by having this function int registeredA(FILE* fp, int area). The proper way to open the file would be
fp=fopen("prefix.txt","r");
thanks that fixed my first function.
But so the second function:int registeredA(FILE* fp, int area)
The file is being passed by a pointer to it. so it should know the name the name without me...
Hey guys I have to functions that I am opening files with and I seem to be doing it wrong.
The first function contains a null terminated string that contains the name of the file.
The second...
i want to insert the object in front of s. If it does this and doesn't
exceed the sz I will return 1, if it does i will return 0.
For example i pass world with a size of 40.
the count on that...
just to set my data member using a constructor and then alter it.
<include <cstring>
<include <cstdio>
class Prep {
public:
void print()
{
printf("%s");
}