Posts
 
Reputation
Joined
Last Seen
Ranked #453
Strength to Increase Rep
+7
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
5
Posts with Upvotes
5
Upvoting Members
5
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
4 Commented Posts
~31.2K People Reached
Favorite Tags

75 Posted Topics

Member Avatar for justinlake888

[QUOTE=justinlake888;697414]hello... I am trying to convert 2 digit numbers to words: example 11= eleven. I saw some other entries on this but they dont include case or switch [/QUOTE] well, here it is, if my number spelling is not quite correct...srry a switch is still used, but it's much smaller …

Member Avatar for hermel
0
2K
Member Avatar for kux

ok, I've checked the forum and I don't think this topic was touched. What I would need is an open-source or at least free static analysis tool for C++ code. Does anybody have any suggestions? I mean, searching the web C++ lacks A LOT at this chapter, compared to Java, …

Member Avatar for IssamLahlali
0
255
Member Avatar for kux

if u pass a std::vector by value to a function, does all of it's content get copyed? thx

Member Avatar for kunal kislay
0
2K
Member Avatar for something else

i don't know what "convolute a gaussian" actually is... probably because I skiped my math class :) ... but, in cases like this you should do a study over the algorithm ivolved ( you could even post some links here so we can see it too ) and then try …

Member Avatar for msiddi13
0
399
Member Avatar for kux

take a look at this code: [CODE] template <class T> class C { public: class A { protected: int x; }; class B: public A { protected: void write() { cout << x << endl; } }; }; [/CODE] when I try to compile with g++ i get: test.cpp: In …

Member Avatar for kux
0
144
Member Avatar for VMG
Member Avatar for kux

ok, so visual C++ is not C99 compliant, but I was wondering how can I access fixed bit length integer types as the one defined in stdint.h (intN_t). thx in advance

Member Avatar for ArkM
0
117
Member Avatar for inktri

[QUOTE=ArkM;734101]Obviously the possible solution depends on the general architecture of your application (and run-time environment). In standard C++ an object life time defined with regard to the only execution thread and it's not a real time.[/QUOTE] Hmm, i find this question very interesting, and as ArkM said, it's very run-time …

Member Avatar for kux
0
446
Member Avatar for nnhamane

[url]http://en.wikipedia.org/wiki/Dynamic-link_library[/url] just read this. It's quite well explained

Member Avatar for kux
0
114
Member Avatar for kux

I have a document/view aplication that opens a bitmap I use the following OnDraw override to draw the bitmap on a window and OnOpenDocument to opening the image from file The bitmap handle ( HBITMAP bmaphandle ) is taken from the Document object that does LoadImage in it's OnOpenDocument method …

Member Avatar for kux
0
175
Member Avatar for flexy82rpq

ok, u solved your problem, but still there are some problems you should notice: 1. never put function definitions inside a header file, just the declarations. If you want to include that header in more compile units you will end up with a linker error because the compiler will generate …

Member Avatar for kux
0
121
Member Avatar for drdolittle

[url]http://www.scribd.com/doc/3048219/expert-c-programming?from_related_doc=1[/url] read from page 230

Member Avatar for grumpier
0
121
Member Avatar for cooljeff1379

Well, C++ is just a language, with quite a small standard library, but with A LOT of provided compilers, frameworks and third party libraries. From my point of view ( and many others, I think ) g++ is the best compiler for C++. Visual C++ is quite a generic name: …

Member Avatar for kux
0
386
Member Avatar for empathy

[CODE] char *stringarray[] = { "mama", "tata", "bunica", "mama", "tata", "georgel" }; map< char*, int > mycountingmap; for ( size_t i = 0; i < sizeof( stringarray ) / sizeof( char* ); ++i ) ++mycountingmap[ stringarray[i] ] ; //print result for ( size_t i = 0; i < sizeof( stringarray …

Member Avatar for kux
0
225
Member Avatar for jbrock31

you did not allocate memory for the int* Tests variable. the thing is I have a testScores = new int[numTests]; but you don't use that nowhere Now, the thing is like this Reading your program what you actually try to do is iterate through each student and give to him …

Member Avatar for jbrock31
0
143
Member Avatar for rmlopes

hmm, the thread name is kind of missguiding this should better be "error linking to loki" as you can see all your .o files compile fine, but the linking is the problem did you build the Loki library? I know Loki is mostly a template library that need not be …

Member Avatar for rmlopes
0
219
Member Avatar for busnerrors

your vector has no reserved sizes, so all insertions [CODE] //option 1 vector < vector<int> > grades; for(int i = 0; i < 30; i++) { vector<int> tempVec; for(int j = 0; j < 20; j++) { int temp; myGrades>>temp; tempVec.push_back( temp ); } grades.push_back( tempVec ); } [/CODE] [CODE] …

Member Avatar for busnerrors
0
135
Member Avatar for dmanw100

[CODE] std::fstream BoardFile; BoardFile.open(arrayFileName->c_str()); [/CODE]

Member Avatar for kux
0
147
Member Avatar for nareshvlsi

[QUOTE=nareshvlsi;718802]hi all, plesae any one can send me c++ code for radix-2 Fast Fourier Transform.. my email: << email id snipped >>[/QUOTE] :) [url]www.google.com[/url] enjoy

Member Avatar for Salem
-2
248
Member Avatar for Kanvas

to solve the compilation error u have to forward the declaration of class device. That means simply add a [CODE]class device;[/CODE] before you declare BST good luck

Member Avatar for sidatra79
0
193
Member Avatar for JustinJose12002

[QUOTE=JustinJose12002;717658]How can i grep a file using c++..? I have a file. File having a keyword. i want to get the count of that. i am tring to do int count ; count = system("grep -c keyword file1.txt"); cout << count ; /// this is giving me system command return …

Member Avatar for Ancient Dragon
0
6K
Member Avatar for Kanvas

[QUOTE=Kanvas;717503]how do you make a node of pointer of a device? (device is just a class that i made up, i need to use pointers in LL so i can "share" one object with multiple LLs) [code] struct node { device * devicePtr; node * left, * right, * next; …

Member Avatar for kux
0
243
Member Avatar for panpanf

[QUOTE=shrughes;716624]Bullshit.[/QUOTE] Then what are they written in ? MonkeyLanguage?

Member Avatar for dmanw100
0
235
Member Avatar for Liszt

Anyway, this is OS dependent, but I really can't find any other way except the looping. Another way would be to check all the interrupts at kernel level and see what system calls refer to your folder and would modify it's content, but I don't think this is legal or …

Member Avatar for Liszt
0
85
Member Avatar for novice420

hmmm, ok, sorry, but your ideea with the file being the chatroom or whatever just isn't good !! First of all, you have to synchronize all acces to that file. When one user is writing the file all others must wait. When one user wants to print the "chatroom" he …

Member Avatar for Salem
0
199
Member Avatar for cplusplusgeek

[QUOTE=cplusplusgeek;714749]Could there be any better ways to determine whether a number is prime or not particularly with respect to code execution. [/QUOTE] well, you will defenetly won't find any divisors greater then n/2 !! so, instead of iterating to n-1 you could just iterate to n/2. Another thing would be …

Member Avatar for sidatra79
0
185
Member Avatar for alin_yuhee

[QUOTE=alin_yuhee;713066]i want to make a simple game with c++ but i really do not know how to do it:-/ ....can somebody help me to do that because i really want to know how to make a game by using c++...:?:[/QUOTE] aaaaa, what game? [CODE] #include <iostream> //for opengl and directx …

Member Avatar for William Hemsworth
0
124
Member Avatar for madf26

[QUOTE=madf26;713052]Sorry outright if I have posted in the wrong forum. My laptop has turned against me in the last few weeks. Ex of errors I get on a daily basis: 1. Windows internet expolorer out of memory at line 2 (sometimes 26) 2) microsoft visual ctt runtime library, runtime error …

Member Avatar for grumpier
0
233
Member Avatar for manzoor

of course the pointers in the structs point to the same thing. That is because you do a shallow copy. If you want the two char pointers inside the structs point to diffrent strings you need to do a deep copy ( copy the content pointed by the pointer in …

Member Avatar for e_agam
0
81
Member Avatar for c++ prog

ok, what u posted is just the connection part. What do you mean they don't interract? I mean, u know u have to send messages from server to client and from client to server via send, recv || write, read.

Member Avatar for c++ prog
0
128
Member Avatar for kux

ok, long story make it short I have a quite large project, a makefile and gnu make. All runs fine. Trying to port the project to windows, and building with mingw32-make I come accross some problems... One of it is that i can't use sed for automatic dependeny generation as …

0
89
Member Avatar for Geard2

Why bother implementig your own list when you can easly use std::list and a struct Data{ string name; int value; }; with it?

Member Avatar for stilllearning
0
114
Member Avatar for andyT

just use the vector constructor that takes 2 iterators as parameters vector<int> vectorOfInts ( current , current + 10 ); if u're vector is allready constructed u could vectorOfInts.assign( current, current + 10 ); if u want to append copy( current, current + 10, back_inserter( vectorOfInts ) );

Member Avatar for andyT
0
227
Member Avatar for opposition

[CODE] char buffer1[]="mama are mere#nu ma intereseaza\r\n"; char buffer2[]="nu am nici un diez\r\n"; char*p1,*p2; p1 = strtok( buffer1, "#"); printf( "choped from # : %s \n", p1 ); p2 = strtok( buffer2, "#" ); printf( "choped from # : %s \n", p2 ); [/CODE] this is what I understand from …

Member Avatar for iamthwee
0
124
Member Avatar for ART01

[CODE] #define ARRAYBLOCKSIZE 3 void addtoarray( int** a, size_t *length, size_t *capacity, int x, int y ) { for( size_t i = 0; i < *length; i++ ) if ( (*a)[i] == x ) { if ( *length == *capacity ) { *a = ( int* ) realloc ( *a, …

Member Avatar for ART01
0
108
Member Avatar for kux

ok, I tried to do some reasearch first, but haven't really found what I was looking for. Each windows app uses a message queue that stores user input and calls the required event handler ( a simple way of putting it ... ). What I was thinking is that has …

Member Avatar for Ancient Dragon
0
116
Member Avatar for Jennifer84

[QUOTE=ArkM;697733]The only addition to Ancient Dragon's C stream library method: add setvbuf call after fopen: [code=cplusplus] const size_t BSZ = 1024*32 // or more ... FILE* fp = fopen("..\\TextFile1.txt", "r"); if (fp) { setvbuf(fp,0,_IOFBF,BSZ); // No need to free buffers explicitly ... [/code] Default stream buffer size is too small …

Member Avatar for Jennifer84
0
7K
Member Avatar for c++ prog

I think I understand what u mean. I remember the old days when I was doing a simple "snake" game in pascal. Back then I was able to do something like repeat repeat .......move snake in one direction..... until keypressed(); ..... process input key and change dirrection.... until forever or …

Member Avatar for Duoas
0
264
Member Avatar for asifjavaid

[QUOTE=asifjavaid;697898]hi guys, i have declared a char pointer. i am using this in itoa() function to convert integer data into hex data e.g [code] char * hexData= NULL; itoa(1484820,hexData,16);[/code] this results in equalent of 1484820 in hex decimal and store it in hexData. now when I want to some process …

Member Avatar for ArkM
0
173
Member Avatar for kux

Compile this code with MSVC2005 [CODE] unsigned short x = 20; unsigned short y = 20; for ( unsigned long i = 0; i < x * y ; i++ ) { cout<<i<<endl; } [/CODE] and u get warning C4018: '<' : signed/unsigned mismatch why? i mean, it all runs …

Member Avatar for kux
0
133
Member Avatar for daviddoria

[url]http://www.parashift.com/c++-faq-lite/pointers-to-members.html[/url] this is a good tutorial on doing workarrounds in passing member function pointers. If the static member is not suited, the other "function wraper" that uses a global object is probablly better

Member Avatar for kux
0
670
Member Avatar for kux

I came accross a strange thing, maybe it's stupid, or I don't have the knowledge of how linking actually works... I have a project that builds in a static lib, and anoter project that builds in an exe and links to the static lib. Compiled with MSVC 2005, all works …

Member Avatar for ArkM
0
108
Member Avatar for Sci@phy

[QUOTE=Sci@phy;694907]I'm aware of that, but that's not the issue here. If i go with string, when trying to access deleted memory site, OS gives an error (because of pointer accessing something he shouldn't) If i go with my object, when trying to access deleted memory site, I can access it![/QUOTE] …

Member Avatar for kux
0
93
Member Avatar for kux

This may sound silly. I have a class that contains a vector of pointers to instantiated objects. I want to return a refrence to that vector, but I don't want to be able to modify the vector through that refrence. Now, if i return a const reference, the vector is …

Member Avatar for dougy83
0
113
Member Avatar for rkumaram

yea, and when writting the assignment operator=, don't forget the assignemt to self problem

Member Avatar for rkumaram
0
113
Member Avatar for vadan

[QUOTE=vadan;677319]Hi iam a newbie to C++ I have a problem, pls give me a solution I have an object in the shared memory which encapsulates an array of 6 objects. I want to acess one of the objects in the array. If the first object in the array is already …

Member Avatar for Clockowl
0
163
Member Avatar for dmanw100

[QUOTE=dmanw100;677214]Are there any standard C++ libraries that support multithreading other than windows.h?[/QUOTE] Well, there is no STANDARD C++ library that supports multithreading. windows.h is WinAPI, so it's not standard. If you want multithreading on win, you could use WinAPI, if you want multithreading on UNIX based you could use pthread. …

Member Avatar for kux
0
154
Member Avatar for kungfoo

sorry dude, but this is just retarded. U want your test solved... ok, but firt get a fizics or mechanics book, get the formulas you require to calculate what you need and that's it. You just have to call a few function and add a couple of numbers. This is …

Member Avatar for VernonDozier
0
255
Member Avatar for kux

This is cited from Stroustrup third edition [CODE] void f () throw (x2 , x3 ) { // stuff } is equivalent to: void f () try { // stuff } catch (x2) {throw; } / / rethrow catch (x3) {throw; } / / rethrow catch (...) { std: :unexpected() …

Member Avatar for kux
0
107
Member Avatar for charlinjoe

[QUOTE=charlinjoe;659294]I am deleting a pointer using "delete" in C++. That pointer is holding the address which is used by OS like 0x00000210. What will happens?[/QUOTE] You got the problem all wrong. First you can't delete something used by the OS. Your process has it's own adress space, so adress 0x00000210 …

Member Avatar for CoolGamer48
0
92

The End.