10 More Discussions You Might Find Interesting
1. OS X (Apple)
Hi guys...
Macbook Pro, 13", circa August 2012, OSX 10.7.5, default bash terminal.
I require the capability to convert +32767 to -32768 into signed hex words...
The example piece code below works perfectly except...
#/bin/bash
# sign.sh
# Unsign to sign...
while true
do
# I have used... (2 Replies)
Discussion started by: wisecracker
2 Replies
2. Programming
My question is simple: When should I use a long, int, char, unsigned/signed variables??
When I declare a variable "unsigned;" what did I do it???
Why would I delcare an integer "long" or "short" ( unsigned or signed)??
Any examples of when things like "unsigned", "long", "short" etc...... (6 Replies)
Discussion started by: cpp_beginner
6 Replies
3. Programming
Hi,
Can any one tell me why my following program is crashing?
#include <iostream>
using namespace std;
class CA {
public:
const static int i;
};
const int CA::i = 10;
int main() {
int* pi = const_cast<int*>(&CA::i);
*pi = 9;
cout << CA::i << endl;
} (6 Replies)
Discussion started by: royalibrahim
6 Replies
4. Programming
Hi,
from the manual
listen(2): listen for connections on socket - Linux man page
It has a parameter called backlog and it limits the maximum length of queue of pending list.
If I set backlog to 128, is it means no more than 128 packets can be handled by server?
If I have three... (3 Replies)
Discussion started by: sehang
3 Replies
5. UNIX for Dummies Questions & Answers
hello everybody!
I want to create a file with permissions for read, write, and execute to everybody using C, so I write this code:
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
int main(){
int fileDescriptor;
fileDescriptor =... (2 Replies)
Discussion started by: csnmgeek
2 Replies
6. Programming
What does the warning message 724 "Cast converts default int return type to." tell me.
I am new to C. (used it some in college). We are migrating our c-code to 10.2.0.3.0. The programs compiled clean. However there were several warning messages that kick out. The most prominent warning is: ... (5 Replies)
Discussion started by: rtgreen
5 Replies
7. Programming
hi,
Please help me with the following code to get the difference in values.
struct a{
int b1;
int c1;
char d1;
}
main()
{
unsigned int b=10;
unsigned int c;
c = b - (unsigned int )sizeof(a);
printf("%d",c);
}
Here c returns some junk value. How can i get the... (2 Replies)
Discussion started by: naan
2 Replies
8. Programming
What is the difference between int** func() and int*& func(). Can you please explain it with suitable example.
Thanks,
Devesh. (1 Reply)
Discussion started by: devesh
1 Replies
9. Programming
class base
{
public:
virtual void disp()
{cout<<"from base\n";}
};
class derv : public base
{
public:
void disp()
{cout<<"from der\n";}
};
int main()
{
base *b=new derv;
b->disp();
derv *d;
d=dynamic_cast<derv*>(b);
d->disp();
return(0); (0 Replies)
Discussion started by: sarwan
0 Replies
10. Programming
How can I store and/or print() a number that is larger than 4 294 967 295 in C? is int64_t or u_int64_t what I need ? if, so how can I printf it to stdout? (2 Replies)
Discussion started by: nimnod
2 Replies