First off let me say that I know very very little about programming and what is or isn't possible.
But I'm planning on building something for a business and outsourcing the development, but first I want to find out if what I am trying to build is even possible.
Here is my project:
Everybody knows that Microsoft Word and Excel don't exactly play nice with each other.
It isn't the easiest...
User Profile
Collapse
-
I don't know programming. Is this possible?
-
C++ how to reverse singly linked list
My class
...Code:#ifndef NODE_H #define NODE_H #include <cstdlib> // Provides size_t and NULL class Node { public: // TYPEDEF typedef int value_type; // CONSTRUCTOR Node(const value_type& init_data = value_type(), Node* init_link = NULL) { data_field = init_data; link_field = init_link; -
Like this???
Code:MyString::MyString(char *s) { buf = new char(get_length(s)+1); for(int i=0;s;++i) buf[i] = s[i]; buf[get_length(s)] = '\0'; } -
I'm sorry, I'm not sure I understand your answer. So what am i doing wrong and how do i fix itLeave a comment:
-
C++ constructor help!!
class description (MyString):
class defines a sequence of characters (similar to class string). The implementation must be as an array of characters that are dynamically allocated and resized as necessary. You must use a null character to terminate the string - just like C-strings are null terminated.
deafult constructor:
...Code:/// get_length(char *s) gets length of s before null character. buf is private
No activity results to display
Show More
Leave a comment: