168 Posted Topics
Re: [QUOTE=dongzhe;660654]thanks man. we use pic18 serials. I get c complier which is picc and ide mplap from the company. I never have experience on embedded programming and chip things. so is there any hints or resourse could help me get start?[/QUOTE] Well, if you don't have any experience of working … | |
Re: Brizhou, Is that all have you got so far. The was a poor attempt. And where is your code tag. No one of gonna ook at your took. Let me ask, have you understood the question throughly? If not you need to sit down and look at it and make … | |
Re: The only thing which you need to work around is to find the no of digit after the decimal point. If you can get the no of digits you could pow function to get the denominator and the numerator would be just the original number with no decimal point in … | |
Re: I don't think, it does make any big difference in writing the values into the file in either ASCII or binary is going to give you any difference in terms of file size. It all the same as far i can see. Yes, there are function and routines which you … | |
Re: Well why dont you use a library function from math.h. [code="c"] #include <math.h> ... ... sqrt( 4 ); [/code] ssharish ![]() | |
Re: You could actually solve this problem using the fgets and sscanf function. These two function would do all things which you are looking for. Perhaps, you will have answer the Salem's question for you could implement it. ssharish | |
Re: Is this machine, connected to any domain controller?? I some cases the keyboard donst get recoganised you might well have to restart the computer once again. In order to recoganise. Do you see any power light on the keyboard i.e the num lock key on your keyboard lit up? Alternatively … | |
Re: May be you should really consider lookin back the sticky thread on top of this form. Is it your homework my friend???? ssharish | |
Re: Try atof. See if they get the same answer. As said before it an implemenation issue. ssharish | |
Re: Perhaps, you should have posted this question on a C++ form :-/. And few things which I saw in your code, which you might have to consider to correcting [code="C++"] #include <stdio.h> to #include <cstdio> [/code] And main should return a value. Well, it’s already if you don’t specify it … | |
Re: pLike, you should really consider looking at on how to indentent you code first. Well the error message you get there is basiclly specifying that GetInteger cannot be assigned to the interger. It donst know what the RHS is? Seems to me like it is function or is it macro … | |
Re: [code="C"] #include<stdio.h> #include<math.h> int factorial( int ); int main() { int n; double x,i; double value, sinx; value = sinx = 0.0; printf("Enter the value for x and i"); scanf("%lf %d", &x, &n); for( i=1; i<=n; i=i+2) { value = pow(x,i); sinx += (x - value / factorial(i)); } printf("Result … | |
Re: I don’t have much to say, b’cos most of the clues on why this happened has been already pointed out. But the main cause for this problem is when you run the code once and then try running it once again or compile or rebuilt it. You might have to … | |
Re: [QUOTE=Epic Tissue;654698]If you define a function properly and then go to use it and get an error while using it (a typo or something), you don't have to define the function again.[/QUOTE] Well, why dont you get a good IDE and start coding in there. I IDE which I have … ![]() | |
Re: Ohh man, you need to properly indentent your code. It so difficult to go through with that code. Identent your code, you might except more help. And what is '#' char in each line? Dosnt look good! ssharish | |
Re: Well, that gonna be difficult using the system function, since the function doesn’t return anything expect the status i.e 0 or 1. What you could do is pipe the output to a file and access that file to get the output of that program. Or you will have to fork … | |
Re: Shouldn't that be either [icode](*iter).name[/icode]or[icode]iter->name[/icode] ssharish | |
Re: Well, I should say that, I don’t even understand on what your are trying to do here. You will have to give some more information. And your code i just such a lot of mess. You are using stuff which you shouldn't be. Few which i pointed out. 1. Using … | |
Re: I would be more helpful if you could say on what platform are you working at the movement? Its different to Linux and on windows! ssharish | |
Re: arrrr why don't you search on the web, there are tutorials which you could explain everything. Well, what happened to your library books. But i thought i will nice to you today :). So here are some link which i thought is more reasonable [URL="http://www.cprogramming.com/tutorial/c/lesson3.html"]Break and Continue[/URL] [URL="http://www.cprogramming.com/tutorial/c/lesson4.html"]Return[/URL] ssharish | |
Re: haha he really expecting us to do his work. nana ;) you can't do that here my friend. Narue has already shown in here sample code on her previous post. You wouldn't believe its just a 2 line of code. Narue with your permission i gonna pinch your code. [code="C"] … | |
Re: I was about to suggest to use fgets function, but AD had already have a post on it. Using a fscanf function is also a good idea. But only other thing which you might have to do if your using fgets is that, you will have to token the string … | |
Re: Hmmmm that was good question, it need a 2 min think before we could answer that question. I never an interview question like that before. But that was good one. I don't see any improvements when we could do to that code. Everything seem to be good. And I do … | |
Re: OK, this question seems a pretty simple at first instance, but there are lot many things which need to be considered while coding this part. There are several ways to solve this problem. One of simple way ways is to coding this on some event, like a button click on … | |
Re: Perhaps, you could have a look at a fgets function, which actually reduces few lines of code, but still does what you wanted to do. Have a look at that function. This is just to give you some more clarity for your code. ssharish | |
Re: Shankhs, what you have done in the main code is that, you have declare two char pointer, but the pointer itself cannot store the string which you have typed. What you can store is an address of a variable of type char. So you will have allocate enough space to … | |
Re: And also there are few things which you need to look back again, and try avoid using function like getch and gets function instead use getchar and fgets function which does the same job like what the former one does. It just the matter of standardization and portability. And don't … | |
Re: Well, let me make it as brief note, but not too much information. All these should be researched on the web. There are plenty notes on these concepts on the we. But anyway. A function can be thought of a group of statements which does a specific job for you. … | |
Re: [code="c"] #include<stdio.h> struct student { int id_no; char name; int average; }; int main() { struct student stud1; do { printf("Enter Index No : "); scanf("%d",&stud1.id_no); printf("Enter name : "); scanf("%s",&stud1.name); printf("Enter average : "); scanf("%d",&stud1.average); printf("\n"); } while( stud1.id_no != 0 ); return 0; } [/code] Where is your … | |
Re: [code="cpp"] #include <iostream> #include <string> using namespace std; int main () { string str; cout << "Please enter full name: "; getline(cin, str); cout << "Thank you, " << str << ".\n"; cin.get(); return 0; } /* my output Please enter full name: hello Thank you, hello. */ [/code] Seems … | |
Re: In addition to what Ancient Dragon said, YES java can be used to program some low level devices. As far I know it is quite used in the mobile programming and in Bluetooth and many others. Well what you need to understand here is the fact that they are all … | |
Re: You indentation is OK but not perfect. You present your code in a good way, .you expect can expect more help. Take me an example I totally ignored your post when I just looked at your at start. I had a look at it again. This applied to all newbies. … | |
Re: [QUOTE]Write a program that uses pointers to type double variables to accept 10 numbers from the user, sort them, and print them to the screen. [/QUOTE] This is pretty tricky. The question says "pointers to type double variable", but it don't anywhere say "pointers to type double array. Which is … | |
Re: Pleaseeeeeeeeeeeeeeeeee use code tags :'( and intendant the code. ssharish | |
Re: Have you already installed in Windows XP on your machine. Or is this the first windows installation. Becase you will have consider lot many things when installing lower version of windows on to latest version. Its normally the other way around. ssharish | |
Re: What do you mean by linking here? Are you trying to run a different program with a program and are you trying to access the a website. If you you could use sockets to access the websites. ssharish | |
Re: Well, ok i decided to give you hint but not the answer, here you go with some sample pesudo code. This should give you an idea on how to approch this problem. [code] character [] source = " We dont do your homework " charater [] destination; Fetch each char … | |
Re: Well I really suspect it could be the DNS in your case. The wireless router is get you the DNS. Ok the better idea is to find out the DNS server address and the configure it manully. But before you do that try pinging to this address "64.233.187.99" and see … | |
Re: [code=C] char foo[1]; [/code] Change that to [code=C] char foo[2]; [/code] I dunno what happenes there, but that works. And always typedef the struct after it has bas been defined. And intialise the tree pointer at main to NULL before you send that the function add_name. That is must. You … | |
Re: hmm this is the first time i am looking at a different way of allocating a 3D array. But referecing the elements within that is something really interesting. This is how i use to follow [code=C] #include <stdio.h> #include <stdlib.h> int main() { int ***array; int i, j; if( ( … | |
Re: Haha, OK i will give you an hint but not the answer. So relational operator should be used. But they dint say that cant use arithmetically operator did they???? Is that more than enough to give you a hint. ssharish | |
Re: Hey singal.mayank, well what i can see is that you know what you want, but why don't you try implement them. You know that sentence can be delimited by the multiple chars. . ! and there are many other which need to considered as well. Jeph has already give an … | |
Re: Enjoy your stay with our codeeeey world. Warm welcomeing you !!! :) ssharish | |
Re: Have a look at a function calle3d fgets which is defined under stdio.h library. This function will do what excatly you want. It read a line of text from the text file until it EOF which then return NULL. The sample usage of that function can be found bellow [code=C] … | |
Re: Well, it does make any difference in assiging the a string to a char pointer. What I really wonder is how is that killing your processor. Is there any loops which goes to an infinite loop? Or there may be some problems with the implemenation of that function may be. … | |
Re: nelledawg you could clearly see from the error message what the problem with the code is. Lets have a look at your some of your error message and the solutions for that error. [code] Error 1: error C2660: 'total_sales' : function does not take 0 arguments [/code] What does it … | |
Re: It would be more helpful if you could specify on what platform and compiler you are using?? ssharish | |
Re: Ok what installer is it. Are you trying to install VB6.0? You can get visual studio express edition for free. Why not install that. What programming language are familiar with? By the way, welcome to daniweb. ssharish | |
Re: why the hell would you require jerusalem-frere.2 file. You know its a DOS virus. And on top you expect us to post that code down here and get polluted. ssharish | |
Re: May be you should be looking for something like this from string import split, lower import os, string strOriginal = "God Godess Brother Sister Family" strFinal = [] strTofind = raw_input("Enter a word ot search") for token in split(strOriginal, " "): if string.find(lower(token), strTofind) != -1: strFinal.append(token) print "The final … |
The End.