this might help a little, it will convert a string to a long, extracting only numbers and leaving everything else out:
long stringtolong(char tempstr[])
{
long templong=0;
int counter;
...
Type: Posts; User: Bull
this might help a little, it will convert a string to a long, extracting only numbers and leaving everything else out:
long stringtolong(char tempstr[])
{
long templong=0;
int counter;
...
something like this will probably work fine:
int spaceplace,counter=0,printcounter=0;
char sentence;
....
....
while(couner<strlen(sentence))
You could always encode the test using an exclusive or statement though its not too secure unless every value you use to encode with is different, ie:
char password[10];
char text[50];
char...
ok we'll if I understand it correctly you want to keep 1 pointer which will point to the front of the list and one to the very last one. Probably easiest way would be slight modification from my last...
ok linked lists are kinda easy to do if you write it on a piece of paper using a box to represent each item in a linked list and arrows representing the pointers in them, ok assume you have a linked...
dont you mean you got some homework off the teacher and you want someone to write it????. For anyone to help you need to atleast put in a bit of effort and show some code of your own and specific...
how can you programming on not know what this is?
My guess is that you opened a data file of some sort, all this is, is hexadecimal, every program, character, whatever is made up of 1's and 0's, 256...
%i just signafies that a variable is in the place of the %, so %d means an integer, so if you wanted to output to the screen someones name and age from variables you would do something like:
...
atoi converts a string to an integer, put a strings pointer and it returns an int:
Declaration: int atoi(const char *s);
itoa convets an integer to a string:
Declaration:
_ char *itoa(int...
I'm not sure of your question but heres a bigger example, hope this helps:
int main()
{
int money=5;
char name[5];
int average=15;
can you just have 2 structures, then when you traverse through the list for example in your search, dont pass the pointers memory address, just pass the value of the pointer (address of the first...
I've done a bit of asm, but dont think they actually specify where the first pc program was made and how, that kind of thing, I asume that it was more of an upgradable thing, pc's originally where...
personally i use the example from B, however i would do something like:
struct node
{
int number;
} NODE;
the advantage of putting the node bit at the end is that to create a new...
you've already asked this exact same question with much less information this type yet the question is still extremly trivial, how is it a dictionary if you have a meaning for "an", how about posting...
i disagree c++ is much worse to teach than c. If you try to teach them c++ then you'll also have to teach them about classes and all the other things that c++ is good for. The best language to teach...
hmm not sure works fine for me, umm try to make sure that the directory to your include is set in your c:\autoexec.bat file, if its not then add it in, something like this at the end will do it
...
can u paste an example of your code.
I'm guessing your compiler or version of conio.h doesnt support textcolor, if you have a look or do a file search for anything that contains the words color or colour, then maybe you might find...
i dont understand, it is simply those commands so if you wanted the text to be red you'd do:
[code]
#include <conio.h>
int main()
{
textcolor(3);
cprintf("\nTHIS TEXT IS RED\n");
...
just clear the screen before displaying any menu:
in dos:
clrscr();
or
system("cls");
in unix:
system("clear");
if your doing it in a borland compiler you can use the command
cprintf (contained in the conio.h file) and use something like:
textcolor(7);
and
textbackground(0);
to change the color of the...
if your talking about a file, then you basically have to have all the information that you want to save in variables and then you can use one of many different file outputs or inputs, just do a...
do a search for linked list's. Using linked lists, you will be able to assign the memory as you use it to a maximum amount, which means you wont waist anything. Makes the program a little tricker to...
umm the reason your program is crashing is probably because your not saving the read in int, double whatever using the memory address, you've got:
main()
{
float first,second,exit,equal;
...
umm all looks pretty alright to me except you have your end of line chars the wrong way, it should be \n not /n. what exactly is the problem with the program?