Posts
 
Reputation
Joined
Last Seen
Ranked #557
Strength to Increase Rep
+5
Strength to Decrease Rep
-1
70% Quality Score
Upvotes Received
9
Posts with Upvotes
7
Upvoting Members
7
Downvotes Received
4
Posts with Downvotes
4
Downvoting Members
2
4 Commented Posts
0 Endorsements
Ranked #914
~32.3K People Reached
Interests
different kind of stuff
PC Specs
dell vostro v131, celeron 867, archlinux openbox
Favorite Forums
Favorite Tags
Member Avatar for alamu

you need to modify only pointer "next", do you know what linked list is? If you know then you can draw something that you whant to do with it and then program this behaviour

Member Avatar for 4rajgopal
0
1K
Member Avatar for ram619

When you subtract two pointers, as long as they point into the same array, the result is the number of elements separating them and in this case each int is 4 byte for example.. then you get this otput on my pc: size of int 4 ptr before changes 2293496 …

Member Avatar for ram619
0
203
Member Avatar for tanatos.daniel

Try otputing to another file instead of windows console and read, as i see you use dos include. Please note that windows new line is not '\n' because it's one byte in linux LF and 2 byte in windows CR+LF please see http://en.wikipedia.org/wiki/Newline

Member Avatar for Sokurenko
0
293
Member Avatar for vipulasri.2007

paste this into your file manager to test c:\\TurboC++\\Disk\\TurboC3\\sample.txt or use sameple.txt and put it in same dir as your exe

Member Avatar for vipulasri.2007
0
676
Member Avatar for saamsonn

are you shure you can use [fgets](http://www.cplusplus.com/reference/clibrary/cstdio/fgets/) ? why dont you use fread for start and try to copy image ? You can also use some hex editor to compare values. **fgets is for text...**

Member Avatar for BobS0327
0
3K
Member Avatar for dancks

if(dist<dr); remove semicolon ? should be or it will do nothing if dist < dr and do nothing on else if(dist<dr) { printf("checkcollision read true\n"); printf("dist: %f, radius+radius: %f\n",dist,dr); goback(0); goback(1); }

Member Avatar for dancks
0
117
Member Avatar for dancks

It looks like it works, please explain better or post file. Also, yes you should take hex editor to know exactly wat you are dealing with.. If it is not 8bit chars then you need to parse it differently.. check out dragon post http://www.daniweb.com/software-development/c/threads/254246/how-to-read-unicode-utf-8-binary-file-line-by-line

Member Avatar for dancks
0
427
Member Avatar for Learningvinit

you reference wrong address, this causes core dump yes ? you add fprintf and maybe initialise some memmory then reference it by mistake, this could be answer m ? check address you reference, and addresses you allocate with memmory

Member Avatar for Learningvinit
0
865
Member Avatar for billionair

this for date ? :) and it should be very portable [Click Here](http://www.cplusplus.com/reference/clibrary/ctime/)

Member Avatar for Ancient Dragon
0
781
Member Avatar for matt.malone.921

you are not the first nor the last who needs to read from file, search google, good luck to you :) http://www.cplusplus.com/reference/clibrary/cstdio/fopen/

Member Avatar for Vish0203
-1
158
Member Avatar for matt.malone.921

can you try this ? or strtol, please say if works while(fscanf(f,"%d",&value) == 1) { /* do something with the value */ }

Member Avatar for Sokurenko
0
88
Member Avatar for shkr

maybe you can use this http://www.cplusplus.com/reference/clibrary/cstdlib/strtol/ #include <stdlib.h> int main() { char *pEnd; printf("%ld\n",strtol("A",&pEnd,16)); return 0; }

Member Avatar for Sokurenko
0
285
Member Avatar for rithish

#include <stdio.h> #include <stdlib.h> #include <string.h> #define HOW_MANY_STRUCTS 20 #define MAX_NAME_LENGTH 30 typedef struct ritnish { int iRoll; char pcName[MAX_NAME_LENGTH]; }stRitnish; int main() { stRitnish s[HOW_MANY_STRUCTS] = {0}; srand(time(NULL)); memcpy(s[0].pcName, "TestName!",sizeof("TestName!")); s[0].iRoll = rand() % 1000; printf("Printing name [%s] and number %d\n", s[0].pcName, s[0].iRoll); return 0; } > ok waltp …

Member Avatar for Schol-R-LEA
0
120
Member Avatar for shkr
Member Avatar for kodeeswari

this i wrote for linux what is your platform ? my ubuntu - gcc #include <time.h> #include <stdio.h> int main() { time_t startSeconds; startSeconds = time(NULL); while(1) { system("clear");//platform specific check your platform this is linux/unix printf("%ld \n", time(NULL) - startSeconds); sleep(1);//platform specific check your platform and change this is …

Member Avatar for Sokurenko
0
103
Member Avatar for manishanibhwani

float is 8 bytes and int 4 bytes if you say %f you expect 8 bytes and type float #include <stdio.h> int main() { int iInt = 1; printf("int %d float %f",iInt, (float)iInt); return 0; } btw i suggest you read char buffer in and then convert it to float …

Member Avatar for deceptikon
0
154
Member Avatar for rithish
Member Avatar for rithish
0
2K
Member Avatar for shanki himanshu

this is what it means fifth is null terminator 065 in oct is '5' check ascii table #include <stdio.h> int main() { char str[]="S\065AB"; char strSame[5] = { 'S','\065', 'A', 'B', '\0'}; printf("str 1 %d \n", sizeof(str)); printf("str 2 %d\n", sizeof(strSame)); printf("same ? %d [%s] [%s]",strcmp(str, strSame),str, strSame); return 0; …

Member Avatar for Banfa
0
543
Member Avatar for vijayabhaskar.chowdary

[Arguments to main click](http://publications.gbdirect.co.uk/c_book/chapter10/arguments_to_main.html)

Member Avatar for WaltP
-1
89
Member Avatar for rithish

or something like that #include <stdio.h> #include <stdlib.h> #include <string.h> char *safe_gets(char *buf, size_t size) { if (!fgets(buf, size, stdin)) return NULL; buf[strcspn(buf, "\n")] = '\0'; return buf; } int main(void) { char str[7] = {0}; int i, k = 0; int iLen = 0; printf("Enter string 1: "); fflush(stdout); …

Member Avatar for Sokurenko
0
226
Member Avatar for I_m_rude

take a look at this [Click Here](http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B#Operator_precedence)

Member Avatar for I_m_rude
0
201
Member Avatar for shanki himanshu

int a[]={1,2,3,4,5,6,7,8,9,10}; You allocate memmory on stack here and a points to that memmory. Then pointer b points to that memmory location b=a i mean now b and a point to same location so you can work with it same as with a here you can try to print it's …

Member Avatar for shanki himanshu
0
97
Member Avatar for I_m_rude

here is good link i found on google [Click Here](http://www.daniweb.com/software-development/c/threads/50370/starting-c-)

Member Avatar for I_m_rude
0
105
Member Avatar for on93

Actually all you need is to call function bigger 3 times in printbiggest. If input parameters x i z j bot you will need extra parameter inside function iMax first you get to know x and y biggest then save it and compare it to z then save it and …

Member Avatar for on93
0
123
Member Avatar for Skrell

use printf("size of char %d size of int %d",sizeof(char),sizeof(int)); bot pointer is always 4 byte no ? maybe you can try to cast to char ? by the way where is problem? strcpy(*rowptr,"d"); strcpy(*(rowptr+1),"c++"); printf("ROWPTR+1[%s]",*(rowptr + 1)); strcpy(*(rowptr+2),"java"); printf("ROWPTR+2[%s]",*(rowptr + 2)); they print correct, no ? please see howto allocate …

Member Avatar for Skrell
0
98
Member Avatar for sparsh610

do you know how to create linked list ? if yes then to reverse you can use this post [Click Here](http://www.daniweb.com/software-development/c/threads/426342/singly-link-list-backward) you just take your list and while you traverse it just move to new in reversed order

Member Avatar for sethlahaul
0
168
Member Avatar for lastbencher

> Is it necessary to free the memory of the node that is deleted? What do you mean deleted then ? In c if you loose pointer to some data it is called memmory leak, cause no automatic garbage collection is implemented in c. In java if all references lost …

Member Avatar for sethlahaul
0
212
Member Avatar for monmondiesel

use this [Click Here](http://stackoverflow.com/questions/1534912/how-to-build-in-release-mode-with-optimizations-in-gcc) ifeq ($(BUILD),debug) # "Debug" build - no optimization, and debugging symbols CFLAGS += -O0 -g else # "Release" build - optimization, and no debug symbols CFLAGS += -O2 -s -DNDEBUG endif all: foo debug: make "BUILD=debug" foo: foo.o # The rest of the makefile comes here...

Member Avatar for Sokurenko
0
1K
Member Avatar for jesskavidja

should it work same as strtok ? try not to use malloc and use array index instead of pointer arithmetic then when it works you can try pointer arithmetic(just increment address instead of index) and malloc Make working code and convert would be more easy maybe :)

Member Avatar for Sokurenko
0
285
Member Avatar for sparsh610

Maybe it is [stack](http://en.wikipedia.org/wiki/Stack_%28abstract_data_type%29#Linked_list) ? you push new to first and then pop from first till last ? :) that will be reverse

Member Avatar for mike_2000_17
0
844