Hmmmm////
So how do I link the back to the front.i.e. if the array is full, front pointer moves position+1,back is assigned to position.
Type: Posts; User: Ron
Hmmmm////
So how do I link the back to the front.i.e. if the array is full, front pointer moves position+1,back is assigned to position.
This looks very comlicated. I just want to know how the strings shift positions as new strings are added into the array and the array is getting full.
How can I create a circular array , push the new strings from rear and pop the first strings?
eg: char *s[10]; Like a queue, but with no nodes?
Ooops
How will that put the words in ascending order? Im sure strcmp does not have > or < .
Did not understand, I am comparing a list of different words and arranging them in ascending order. How can I do this without comparing each character?
Hmmmm
so can I do this.... x=y<<4
z=y>>4;
y=x+z;
its very amateurish.....
Also, how do I arrange words in ascending order in an array...
so by just doing x=y<<2^2, swap or would it just shift the last 4 digits leaving the rest as 0?
eg:01000101 swap as in 01010100
or
01000101 shift as in 01010000
...
So u mean to say if unsigned char value is 00000045, it should be swapped as 45000000. Is this what the question is asking?
Ok Heres another question:
"Write a function, unsigned char exchange(unsigned char in),
which exchanges the right 4 bits of an unsigned char with its left 4 bits (e.g. exchange(0x54) will return...
I did not understand the explanation for the 4th question.
I have a set of questions that may be asked for my exams. Can anyone tell me the solutions to this?
Q1)
What is the problem with the following copy?
char *s1 = “hello”;
char *s2;...
Errors
mystring.hpp:49: error: destructors may not have parameters
mystring.hpp: In constructor `mystring::mystring()':
mystring.hpp:40: error: expected primary-expression before '->' token...
IM getting a long list of compile erros
Header file
#ifndef STRING_HPP
#define STRING_HPP
#include <iostream>
im still getting the same error in the constructor for both theString and size
error:expected primary-expression before '->' token
hmmm.. so another question, in the operator + when Im working with the 'this'. would the syntax be this.theString or this->theString?
I think I got what your saying, thanks to tabstop.
Also, my 1st constructor is giving problems.
What is free functions?
As I am not using the string class, I have to define a function with operator overloading. My function definitions such as mystring& operator+(const mystring &string1, const...
Hey Im having a problem with passing arguments into a function from a class.This is my program with just prototypes and function calls. I am confused when to pass by pointer and by reference.
...
So can I change the contents of the struct object with * or &? Also, in the function definition, the object will be defined with its class name or struct name?
eg
myString* myclass...
What is the difference between passing a pointer* of an object to a function; and passing &object to a function?
I wanted to delete this post. Ive already fix the issue.
Hey...
I am having a problem. If I just fscanf a file, with no operations inside, there is no problem. But if I have some operations inside, and I type in a statement like printf(test)just after...
OK, I finally figured what wrong. In the for loop I just assigned p to a prevptr, before doing any changes to p pointer. Every time I make the content of the node free, or malloc it, I label the node...