I have a worksheet saved in XML Spreadsheet 2003 file format.
I’m supposed to read a specific value from it, given it’s cell address, such as „A5“ or „B3“. As I have almost-absolutely no previous...
Type: Posts; User: desmond5
I have a worksheet saved in XML Spreadsheet 2003 file format.
I’m supposed to read a specific value from it, given it’s cell address, such as „A5“ or „B3“. As I have almost-absolutely no previous...
Consider this loop:
while (t != NULL)
{
t = strtok(NULL, tbc);
if (t != NULL)
{
if(time_check_legal(t)) row_add_key(_row, t); // <--- MESSES UP
I just wanted to produce a correct error message instead of the program crashing. How should I proceed with that, then ?
How about checking byte order mark ? Is that doable ?
Hard from who's point of view ?
No question about that. I shrinked the program a lot and uploaded the source and the input file that produces the error here: http://www.andresraieste.pri.ee/ttu/IABB/err/
So..the workaround...
I am trying to reproduce the error by cutting out stuff from the program that aren't related to it. Maybe that will help.
Ofcourse. It's quite lenghty so I'll post a link where I uploaded it instead:
http://www.andresraieste.pri.ee/ttu/IABB/infor2/CPeatus.c
Beware though, as the code is commented in my native...
I don't study IT at college (though I most probably plan to), so it's not a homework. I'm still in highschool and it's just a hobby of mine.
And..um..what kind of homework would be to remove...
Hi,
I made a program that inputs a text file and analyses it (line by line with fgets in a loop, main string functions used are strlen, strtok, strchar, strcpy, strcmp). When the input file is...
Hy,
How can I remove whitespaces from a string ? I.e. like trim() does in PHP. I'm in trouble with making my own.
Many thanks :)
One more thing..I add three elements to the array. How is it that it has 4 ? I even cannot access the fourth element..
#include <stdio.h>
#include <string.h>
#include...
Really ? I don't know what else I need to include..
#include <stdio.h>
#include <string.h>
typedef struct
{
char *name;
Yeah..but it gives a warning "[Warning] assignment makes pointer from integer without a cast" on this line: _row->keys = realloc( (n_keys+1)*sizeof(*_row->keys) );
But what if I wish to add a key after I have already allocated the memory ? Like if I have a function add_key(row *_row, char *key); ? I tried to reallocate but I failed. How would you accomplish...
And on 64bit machine ?
My question was answered :) Thankyou :) If anything comes up, I'll just add to the thread.
Hello,
I have a structure like this:
typedef struct
{
char *name;
char keys[20][6];
Any pointers how to solve this puzzle in general (not using fixed size arrays and so on) ?
If I have an array of char and a char pointer, how can I make the compatible ?
void something(char *mstring)
{
char list[i] = ... // "Hello World"
mstring = list; ?????...
I'm trying to analyze a file, given with a structure like this:
Key1 param1 param2 param3
Key2 param4 param5 param6 param7
Key3 param8 param9
The file has unknown number of...
By a stupid mistake.
I was trying to return the position of a character in a string. The code below doesn't work because of the int *c, if I remove the *, it works fine. Just out of curiosity, how would it be possible to...
I'm not sure. What's the difference between:
int somemethod(char *a1, char *a2)
...and:
int somemethod(const char *a1, const char *a2) ?
Oh, thanks :)
Another question, how can I check if all characters in string are the same (ie "aaaaaa") ?
What's the point of using int a = atoi("0") ? I dont't want to convert "0" to 0 but the first (or second or fourth or whatever) character in the string to int.
If I wanted to loop throught all...