473,560 Members | 2,953 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.
6
3,229
thread by: dedmund2 | last post Feb 20 '06 by: Jacek Dziedzic
Hi, I'm trying to do the equivilant of JAVA's Integer.toString(someInt); in C++, I figure there must be something like this since i know you can use cout or printf to print it, is there a way to not put it to screen just
3
2,080
thread by: danilo.horta | last post Feb 20 '06 by: Ferdi Smit
Hi folks I'm having a scope resolution issue. The gnu compiler is trying to use the "operator function" from derived class rather than from correct one, the base class. // VecBasis.h file template<class T, size_t numDim> class VecBasis { protected:
12
1,986
thread by: kalculus | last post Feb 20 '06 by: Rod Pemberton
Hello Can someone explain what the following code is doing? void *get_gp_value() { void **function_pointer = (void **)get_gp_value; return function_pointer; }
1
2,150
thread by: KevinGPO | last post Feb 20 '06 by: Richard Herring
I am wondering about what's the best and easiest way to strip trailing whitespace from every single file in a folder, recursively. I want to write a program/script so that you pass in a folder name and it'll recursively go through all sub-folders and strips trailing whitespace from every single file. Trailing whitespace includes: 1....
34
6,826
thread by: Roman Mashak | last post Feb 20 '06 by: RSoIsCaIrLiIoA
Hello, All! I'm implementing simple CLI (flat model, no tree-style menu etc.). Command line looks like this: <command> <param1> <param2> ... <paramN> (where N=1..4) And idea is pretty simple: 1) get whole string of input line 2) preset table of strings matching <command> 3) preset table of function calls
5
1,832
thread by: Ufit | last post Feb 20 '06 by: John Carson
Compiling the following code (C++): struct _Item { int var1; ....... _Item *pPointer;
8
4,258
thread by: priyasmita_guha | last post Feb 20 '06 by: Richard G. Riley
C uses call by value for passing of parameters in contrast to C++ which uses call by reference.How is call by value advantageous and how is it implemented?
2
6,309
thread by: ramu | last post Feb 20 '06 by: rlblaster
Hi I have to call a vc++ function in a c program. suppose i have a function dword fun(dword arg1, bstr arg2); in vc++. I have to call this function in c. But I don't have dword datatype in c. So when i call this function in c, i have to convert all the data tpyes of vc++ into c data types. Or I must have equivalent data types
1
2,165
thread by: slayers_ai | last post Feb 20 '06 by: Banfa
hi there can anyone help me with my code? it can be compiled successfully in vc++6.0, however it fails to run. here's the code: //set.h #include <iostream> using namespace std;
0
1,136
thread by: srikanthreddych | last post Feb 20 '06 by: srikanthreddych
Hello friends. New forum is up. Let's get there and spend some there. Please visit http://programming.forumup.com
6
2,307
thread by: santosh | last post Feb 20 '06 by: Dave Thompson
The following code is giving run-time error..... char buf = "Hello" ; strcat(buf,buf) ; Second line is giving the run-time error. Any comments please............
31
3,708
thread by: Newbie | last post Feb 20 '06 by: Dave Thompson
Hi, I'm a newbie. I need to clear my pointer concepts. the code below gives segmentation fault when i use char* str; int main() { char *str; printf("Enter a string to reverse\n"); scanf("%s",&str);
15
3,823
thread by: Paminu | last post Feb 20 '06 by: Dave Thompson
Still having a few problems with malloc and pointers. I have made a struct. Now I would like to make a pointer an array with 4 pointers to this struct. #include <stdlib.h> #include <stdio.h> typedef struct _tnode_t { void *content; struct _tnode_t *kids;
7
5,809
thread by: ashu | last post Feb 20 '06 by: Chris Torek
look at code #include<stdio.h> int *mult(void); int main(void) { int *ptr,i; ptr=mult; for(i=0;i<6;i++) { printf("%d",*(ptr++));
3
4,144
thread by: jilerner | last post Feb 20 '06 by: Chris Torek
Question about C99/gcc struct initialization: void ffoo(void) { struct FOO { int a,b,c; }; struct foo = { .b = 22 }; What happens now to foo.a and foo.c ? Are they initialized to 0, or left unitialized ? Y.L.
12
1,580
thread by: johnsolver | last post Feb 20 '06 by: August Karlstrom
Hi I hope I got the topic right.. that's what I'm doing: create P(variable) polygons each having a variable numbers of vertices, something in my mallocs is wrong... since I get weird results. help? #include <stdio.h> #include <stdlib.h>
2
9,179
thread by: jawilson | last post Feb 19 '06 by: jawilson
Hello, I am working on a project in Borland Developer Studio 2006, and am running into an error I don't understand. Here is the relevant code: //--------------------------------------------------- double splitLoc = 0, fs = 512; double timeRange; int tArr;
4
402
thread by: Akhil | last post Feb 19 '06 by: Richard G. Riley
How can i do a fork() sytem call using a C program?Is it allowed in windows environment or not because it is primarly a system call used by UNIX
11
5,504
thread by: Steven Jones | last post Feb 19 '06 by: Mark McIntyre
I have a C program that prints out two lines as follows: Line 1 Line 2 What I would like is for this program to sleep for one second, and then print out two more lines, overwriting the previous two. The sleeping bit is trivial but, what about the overwriting? I am assuming that the output will be displayed on a standard terminal...
18
399
thread by: stephen | last post Feb 19 '06 by: Mark McIntyre
Hi Just learning c and wonder if anyone can answer a question. I am writing a program that uses threads. These threads will call a specific function simultaneously. This specific function uses a global pointer to run through a linked list of structures. Thread1 enters the function and resets a global worker pointer to point to the...
2
8,692
thread by: Jan Callewaert | last post Feb 19 '06 by: Ian Collins
When compiling a library with the intel compiler icpc, I get the following warning: ld: warning: creating a DT_TEXTREL in object This happens with icc-9.0.030 and ld-2.16.1. However, this doesn't happen on a similar system but with ld-2.15. Is something wrong with my code or can I just ignore this? icpc -O2 -g -fno-inline -Wall -pipe...
2
249
thread by: amruta | last post Feb 19 '06 by: Ian Collins
hi i m new c++ learner. can any one help me. how to co-relate with c++ if, u r already a c programmer. help me.i want to master in c++. hope any one (only one bet millions of c++ lovers)can help me. (hoping .............) bye
5
1,986
thread by: Vladimir Lushnikov | last post Feb 19 '06 by: Julián Albo
Hello, I am in the planning process for developing a VM (Virtual Machine). I have been researching various aspects for developing a VM in C++ for a (semi?-)dynamic language, and am looking at the possibility of implementing JIT for the VM. How would one go about an implementation? Is the bytecode translated into native instructions similar...
2
1,895
thread by: Rouben Rostamian | last post Feb 19 '06 by: Flash Gordon
The main() function in the following code defines an m by n matrix, assigns value(s) to its elements, then passes the matrix to function foo(). For whatever it's worth, I have declared foo() so as to make it treat its first argument as a "read-only" object, that is, foo() can read but not alter the matrix. I have a problem, however, with...
17
6,505
thread by: silverburgh.meryl | last post Feb 19 '06 by: Dietmar Kuehl
In STL, there is no copy_if algorithm. But how can I emulate that? I am thinking about using find_if and then a copy. But how can I pass the InputIterator (begin and end) to copy so that it knows the range it tries to copy from. Thanks for any idea.

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.