Got it working! Cheers Salem:biggrin:
Type: Posts; User: Tigertan
Got it working! Cheers Salem:biggrin:
Hey all ~~
I'm working on a project which involves the use of a Makefile and my own static library for compilation.
I had no problems running my project, including the Makefile, on a different...
Thought that might be the case. All good!
Thanks
How do I delete this thread?
Hello all,
I am at the final stages of a project, and am dealing with leaks.
I am using valgrind (newbie!!).
I am getting the following output:
==11236== HEAP SUMMARY:
==11236== in use...
Hey all,
I believe I have a very basic question for you all.. But I have tried and tried and cant get it to work to save my life.. I am wanting to return the index of the first '\n' that appears...
Cheers John!
I'm not (yet) familiar with how static buffers are implemented but shall do my research and give it a go! Have clearly understood your explanation. Thanks for putting me on the right...
Hi there,
Thanks for your reply. Yes you're right.. I am searching through the bug after the first read of size BUFF_SIZE and am return the first line.. The rest is discarded..
When the function...
Sorry for not being clear!
Here is the full code:
#include "line_by_line.h"
#include <stdio.h>
static int check_line(char *str)
{
Hello Cboarders,
Would love to get some help understanding the read function.
I am attempting to use read() to read line by line.
My code is structured as follows.
int some_function(const...
Thanks for your reply.. Completely missed the fact that there was a "\0" in front of my eyes.
I am confused as to how the standard library returns a -1 for the above scenario.
I am getting...
Hello there,
I am trying to compare two strings, namely:
str1 = "hello\0"
str2 = "hello\200"
When I input the above two strings into strcmp, the output correctly shows that the output integer...
Hello there,
I am trying to compare two strings, namely:
str1 = "hello\0"
str2 = "hello\200"
When I input the above two strings into strcmp, the output correctly shows that the output integer...
Ahh crystal clear now! thanks!!! Got confused with the digits and the positions in the string.. Thank you kindly
Hello cboarders!
I have written the below function, to convert integers to a character string.
The output correctly shows negative numbers. For positive numbers however, the string is not ending...
Hi GReaper,
Thanks for your post. I was trying to print the whole string as I thought that the remaining part would show.. "\0\0\0\0\0\0ee". I was expecting to see the ee using %s.
Helloo... been staring at the same screen for too long and am hoping I can get a tip or two off you cboarders!
I have attempted to re-code the BZERO function. The function appears to do what I...
Understood. Thanks ddutch, will keep that in mind.
Now if anyone else can explain unsigned/signed character strings in a nutshell, that would be greattt (:
Cheers Salem. I have filled both dest arrays with \0 and it looks a whole lot cleaner. Clarifies a lot by filling it up and seeing the changes.
Hi all!! Getting back into programming and starting with some basics - recoding some of the standard library functions.
I'm on to "memcpy" and have a few questions.. My code is below.
1. How...
Cheers, I get it
I'm getting a bit stuck with pointers.
I'm reading three int values in, and would like them sorted such that they print from largest to smallest.
I don't know what I'm doing wrong. I've set the...
Still not getting it right though :/
UPDATED VERSION:
#include<stdio.h>
#define TRUE 1
#define FALSE 0
int near_equal(double, double);
My output is really bizarre.
here is the output for the input values "0.4201, 0.4202".12138
Hi there,
Thanks for your prompt reply!
What do you mean when you write C99 & C89?
From what I understand, one scans a double in with %lf, but prints with %f, correct?
I have been told that...