| | |
vector of string
![]() |
So maybe in C,
Now create a bunch of access functions which take a
- allocate space
- extend space
- free space
- save an int
- return an int
c Syntax (Toggle Plain Text)
struct vector_of_int { int *data; size_t allocatedSize; size_t maxUsedSize; };
vector_of_int as one of the parameters, and make it do things like- allocate space
- extend space
- free space
- save an int
- return an int
•
•
Join Date: Nov 2007
Posts: 9
Reputation:
Solved Threads: 0
•
•
•
•
So maybe in C,
Now create a bunch of access functions which take ac Syntax (Toggle Plain Text)
struct vector_of_int { int *data; size_t allocatedSize; size_t maxUsedSize; };vector_of_intas one of the parameters, and make it do things like
- allocate space
- extend space
- free space
- save an int
- return an int
>>what is size_t . is it something predefined datatype.
Yes -- most compiler define it as either long or unsigned long. But compilers are free to define it however it wants, uncluding long long
Yes -- most compiler define it as either long or unsigned long. But compilers are free to define it however it wants, uncluding long long
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
![]() |
Similar Threads
- How do I convert a vector to a String array ? (Java)
- copying string from a vector to another (C++)
- Array required, but java.lang.String and java.util.Vector found (Java)
- array required, but java.lang.String found and java.util.Vector found? (Community Introductions)
- vector<string> - way to find longest string? (C++)
Other Threads in the C Forum
- Previous Thread: to find the square root of a number
- Next Thread: functions in c
| Thread Tools | Search this Thread |
#include * ansi array arrays asterisks binarysearch calculate centimeter changingto char character convert copyanyfile copyimagefile cprogramme creafecopyofanytypeoffileinc createprocess() database dynamic execv feet fgets file floatingpointvalidation fork function getlogicaldrivestrin givemetehcodez grade gtkwinlinux hacking histogram ide inches include incrementoperators infiniteloop input interest intmain() iso kernel keyboard kilometer km license linked linkedlist linux looping lowest matrix meter microsoft number oddnumber open opendocumentformat openwebfoundation owf pdf pointer posix power probleminc process program programming pyramidusingturboccodes radix read recursion recv recvblocked research reversing scheduling segmentationfault send sequential single socket socketprogramming standard strchr string suggestions systemcall test threads turboc unix urboc user variable wab whythiscodecausesegmentationfault win32api windowsapi






