void reverse(NODE* list)
{
NODE* temp,
NODE * previous = NULL;
while(list!=NULL)
{
NODE *temp=list->next;
list->next=previous;
previous=list;
list=temp;
Type: Posts; User: ilikeapplepie
void reverse(NODE* list)
{
NODE* temp,
NODE * previous = NULL;
while(list!=NULL)
{
NODE *temp=list->next;
list->next=previous;
previous=list;
list=temp;
here is my code
struct list
{
NodeType* listData;
int length;
};
thanks, laserlight.
actually the files are written in c language but ya i get your point.
if you could please tell me how to add the path i would appreciate it ( on the command prompt, i am already inside the directory...
i didn't get error message after changing cl to cls.
hello,
i am using visual studio 2010.
i have been given two files by my teacher. he asked us to compile, execute and see what the result would be.
i have to use cl -D_CRT_SECURE_NO_DEPRECATE...
hi
i really need help with an ADT.
program to keep track of a real estate company's residential listings. The program needs
to input and keep track of all the listing information, which is...
how do i do command line input on visual c++ 2010? all the code i have ever written used the prompt window after compilation. thanks.
it gives
Usage C: the path filename iteration or...
i have very basic c language skills.
my only task is to let the code finish executing and note the values because professor wants us to see the difference in time between recursion and iteration...
hello,
i have tried compiling and running this code but how do i input a numeric value like 30 or 35? this is recursive fibonacci and all i need to do is check the output after program has finished...
this is what i have been given
//global data variables
#define ARRAY_LEN 1000000
int array[ARRAY_LEN];
int maxNum, minNum;
cool cuz i know basic unix shell scripting.
the department had kept data structures as a prerequisite for object oriented programming about 2 semesters back.
so if it's not required now, i should not be worried i guess.
thanks for the...
hi,
i am studying comp. science. i just finished basic C language.
i just wanted to know if i decide to study object oriented programming ( c++ and java), sql and a class on operating systems...
#include <stdio.h>
#include <math.h>
struct position
{
double latitude;
double longitude;
};
double computeDistance(const struct position *p1, const struct position *p2)
i copied and pasted your code. i was getting input error till. i removed commas from scanf then i got the big number.
visual c++ 2008 edition.
#include <stdio.h>
#include <math.h>
...
input
1 2 3 4
output
1726716016253713000000000000000000000000.000000000
yes, that worked no error. ty vry much. but now i am still getting a big number even with someone else's code.
something must be wrong with my compiler. i am really grateful for your help.
input :
1 2 3 4
output : input error
sorry, still no help.
i am a newbie i don't know what's wrong with my compiler. however, if the code works on your compiler at least i know i am on the right track.
#include <stdio.h>
#include <math.h>
struct position{
double latitude;
double longitude;
};
this is the slightly different new code.
#include <stdio.h>
#include <math.h>
struct position{
double latitude;
double longitude;
};
i am using visual studio 2008 i rebuilt, debugged and ran my program and i still get the same big number.
come to think of it, my calculation for the distance was initially wrong.
on x-coordinate...
that doesn't help either. i get another i think i should sleep now been awake all night and go through my logic. i think my formula for calculating the distance may be wrong as well. i really...
hmm, i added the pointers. now there is no error but i get a weird huge number like
92559631394.......