Talula
C# mostly for front end, C/C++ for embedded systems and PHP or NodeJS for server.
Anonymous
how portable?
Anonymous
swapping of two numbers program i want
a=a+b; b=a-b; logic of swapping to number bro..
BinaryByter
Anonymous
so i am writing one
BinaryByter
Anonymous
C# mostly for front end, C/C++ for embedded systems and PHP or NodeJS for server.
u know design the web page and how to connect the database front end to back end
BinaryByter
+ depending on your algebra you dont have the guarantee that a = (a + b) - b
Talula
#include <stdio.h> main() { int a = 10; int b = 20; int c = 0; c = a; a = b; b = c; }
BinaryByter
use that for webdevelopment
BinaryByter
why include stdio if you dont print?
Anonymous
BinaryByter
why copy and no references?
Talula
return type of main?
Depends on C but return isn't needed in embedded systems... it could be void.
Anonymous
in c and cpp has the same program
Anonymous
why include stdio if you dont print?
we use cout in c++ iostream
BinaryByter
Anonymous
i want program in cpp also
BinaryByter
we use cout in c++ iostream
1) your doesnt use cout 2) cout isnt defined in <stdio>
Talula
without return type it wont be parsed as a function
Not in Embedded systems... I'm used more to that.
BinaryByter
BinaryByter
BinaryByter
oh lol it compiles
BinaryByter
dafaq
Talula
do you use the ARDUINO IDE?
I do but not always Android IDE has void setup() and void loop();
Anonymous
return type of main?
you do not need a return type for main
Anonymous
it is a legacy code thing
Anonymous
from the first version of C
Talula
for CCS C (which is for Microchip PIC series) it doesn't have any type of main();
BinaryByter
uurrrghghh
BinaryByter
Anonymous
especially for embedded systems
BinaryByter
int
Anonymous
it still does
Anonymous
i use PICs myself
BinaryByter
int
or four chars
Anonymous
it does not harm the compiler to add int yourself
Talula
You program PIC in XC8?
Anonymous
or four chars
not always
BinaryByter
not always
four bytes*
Anonymous
on some PICs it is only 1 car
Talula
it does not harm the compiler to add int yourself
Yeah it doesn't bit more typing for me.
BinaryByter
on some PICs it is only 1 car
fuck why can't all computers have the same conventions? xD
Anonymous
You program PIC in XC8?
for XC8 i use ASM most of the time
BinaryByter
Anonymous
fuck why can't all computers have the same conventions? xD
because different computers have different bit architectures
BinaryByter
and I dont think that those 2 seconds would be better spent with you
Anonymous
some pics only have 8 bit
BinaryByter
per byte?
Anonymous
i use the int there to tell me if there was an error
Talula
its litterally 5 characters
Oh I'm lazy lol
Anonymous
per byte?
per register
BinaryByter
BinaryByter
PJ
OH
Anonymous
so that when it returns from main i check the status
BinaryByter
such small registers must suck
Anonymous
and see oh this fails or this succeeded
Anonymous
restart or go sleep for x seconds and come back online
Anonymous
you should probably not be using C for XC8
Anonymous
it is too much useless stuff
Anonymous
how to solve tower of hanoi problem in c++.
Anonymous
anyone can explains
Anonymous
how to solve tower of hanoi problem in c++.
i will solve that after i post the code for swapping in C
Anonymous
all my codes are good
Anonymous
just not portable
Anonymous
and also think about it
Anonymous
all my codes are good
yaa yours code good but not good programming
Anonymous
it is a very simple problem