473,543 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C / C++ Forum

C / C++ programming language - Get answers to questions about compilers, visual C++, templates, namespaces, classes, data structures, OOP (object-oriented programming), inheritance, data types, exceptions, Standard Template Library (STL) and the C Standard Library.
0
1,656
thread by: rahulpasupuleti | last post Dec 19 '06 by: rahulpasupuleti
Hi.can someone help me in writing code for communicating with a USB device.For a serial port we have predefined functions for opening the port,reading to the port,writing to the port etc.I want to do the same for a USB port/device.I did not find any help for USB communication by doing a google search.any help from u would be greatly appreciated.i...
0
1,656
thread by: tomerdr | last post Dec 26 '06 by: tomerdr
Hi, I implemented the "Interpreter" pattern for a simple calculator whicu support +\*- I want to ask what is a good way to construct the expression tree? Thanks in advance.
9
1,656
thread by: =?ISO-8859-15?Q?Joachim_B=F6rger?= | last post Jan 29 '07 by: =?ISO-8859-1?Q?Joachim_B=F6rger?=
Good evening! I'm using variables to count from 0 to 4 in a recursion, and I just realized that I could save a lot of memory (and computational time?) by using a BYTE instead of an int. But, having an assignment like BYTE b = 5, bb = 10; b+= bb;
2
1,656
thread by: arnuld | last post Mar 26 '07 by: Peter Shaggy Haywood
i was not even able to understand how should i proceed tow rite solution for this exercise: "Write a program to print a histogram of the frequencies of different characters in its input." then i tried this: http://clc-wiki.net/wiki/K%26R2_solutions:Chapter_1:Exercise_14 i did not understand the following in Histogram solution:
2
1,656
thread by: hairobinson | last post Apr 23 '07 by: hairobinson
What is Core dump? how will it occur? Especially with Linux OS? Please share the code example if any?
1
1,656
thread by: Alessandro Monopoli | last post Apr 23 '07 by: anon
Hi all! I'm having HUGE problems converting some code from STLPort 4.6 to 5.1, to make some old program compile under Visual Studio 2005. Do you know something about? Or a tutorial or something? The code is the Renderware openExport. Bye! Alex
2
1,656
thread by: mahendra23 | last post Jun 23 '07 by: vpawizard
Can u please tell me the difference between strcpy() and memcpy().
3
1,656
thread by: VadiRkp | last post Jul 8 '07 by: weaknessforcats
Hello, I'm want to set up a function that, based on the string and an int argument that is given to it, will set an an int variable to the given value. The int variable is already declared, so the only thing I need to do is assign a value. But I have no idea what would the syntax for that be! Here's a pseudo-code example: int var1, var2,...
11
1,656
thread by: __PPS__ | last post Aug 19 '07 by: __PPS__
Hello all, i have a problem with some code written by other that I need to fix. This is windows specific, but I post it here anyways (simply I always visit complangc++). I have a class that has a reference member. The problem I'm facing happens frequently on WinCE mobile phone. And the problem is that at some point the reference becomes...
1
1,656
thread by: Madhurid06 | last post Sep 19 '07 by: JosAH
Hi, I have written hello program in C language and it encountered compliation Error while compiling. Error is as follow: STDIO.H IS NOT OPENING. I have installed all the header files even. Please do help me out in this regard. Regards, Madhuri
14
1,656
thread by: yeah | last post Oct 5 '07 by: =?iso-2022-kr?q?=1B=24=29CHarald_van_D=0E=29=26=0F
hi all I am working with linux environment and i compiled device driver programs using native compiler "gcc".In one of my macro i have these lines #if (1 << HARDIRQ_BITS) < MAX_HARDIRQS_PER_CPU # error HARDIRQ_BITS is too low! #endif while compiling,it gives error like this
2
1,656
thread by: yembaram | last post Oct 6 '07 by: Banfa
how we use adt's in c++; how it is used in program;
4
1,656
thread by: aditya sriram | last post Oct 12 '07 by: JosAH
hello, i have been trying to work on a division algorithm for numbers which have digits greater than 8. The solution i came up with was using character arrays and succesive subtraction but unfortunately its not efficient enough. Can anyone please help me find a more elegant solution?
2
1,656
thread by: mfleet1973 | last post Oct 22 '07 by: GameboyHippo
Hi. I'm quite new to C++. Please provide the code that does the following: Allocates 500 bytes of memory Allocates 10 kb of memory Allocates 1 mb of memory
5
1,656
thread by: Florian Kaufmann | last post Jan 24 '08 by: Billy Bong
Hello Is there a tool that helps to keep the list of include directives clean and tidy? I would like that each header/source file has only the includes that it really needs, and that forward declarations are used instead of includes where possible. I can imagine that this task is impossible to solve in general, but I hope there are tools...
1
1,656
thread by: vhanwaribrahim | last post Feb 8 '08 by: Martin Ambuhl
Hi all, please see the below code. int main() { char *a; a= malloc(20); strcpy("a,"India""); change(a);
1
1,656
thread by: manu1001 | last post Mar 9 '08 by: DaemonCoder
I've an old C function that calls a function pointed by a global function pointer. How do I get it to call a member function of a class object determined at run-time. It'll be complied in a C++ project of course. My main motive is reusability here. So I don't want to change the C function. Its something like this: void (*foo)(int); ...
4
1,656
thread by: electromania | last post Mar 23 '08 by: JosAH
I need to write a program that can predict the stock market price indicies. The predictions are based on a very naive method that assumes that the market index is a linear function of time. Real life estimates are, of course, much more complicated and keep many people busy all over the globe. Our assumption that the market index, y, is a linear...
7
1,656
thread by: Jim | last post Jul 10 '08 by: Lionel B
Hi, I'm trying to build a simple data table for all my classes to use. I don't want to use a vector. The data is stored in class freqoffset class freqoffset { public: freqoffset():offset(0),strength(0){}; int set(double offset,double strength); double getOff() const{return offset;};
3
1,656
bloodbath
thread by: bloodbath | last post Aug 8 '08 by: Banfa
i have no idea how to use strtok using loops. there are no specified numbers of strings to be entered.
14
1,656
thread by: japhethngura | last post Oct 6 '08 by: user923005
This is to inform all the members that I have now joined the discussion group. Let us make it as productive as possible.
5
1,656
thread by: simmol | last post Dec 12 '08 by: weaknessforcats
Hi, I'm running a simulation over time and I'm having trouble with arrays in my C program. An array element that has been initialized to zero suddenly changes value to 13 after a few time points, and surprisingly, this only happens in some runs. If I print out values from different parts of the program, I can clearly see the value changing. ...
1
1,656
thread by: Man4ish | last post Jun 18 '09 by: weaknessforcats
I am working on file indexing.Input file has million of records so reading index file takes time. How can map (with key as id and value as index) be stored in memory like in Java(JVM)? How can this be implemented. Any sample code doing this will be very much helpul to me. Thanks in advance.
4
1,656
Markus
thread by: Markus | last post Oct 12 '09 by: donbock
Can you explain why line 31 does not require the address-of operator, while 33 does? I don't quite understand it. #include <stdio.h> struct computer { float cost; int year; int cpu_speed; char cpu_type;
3
1,655
thread by: Luca | last post Jul 19 '05 by: Ron Natalie
do you know if there is some upper bound on the number of members that can be contained in a union?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.