49,761 Topics

Member Avatar for
Member Avatar for Devoney

Hi all, Yesterday I ran into RDTSC, very useful to have knowledge of, especially when you are using performance counters and timers etc. RDTSC will return a value to you (64 bit) which contains the current clock cycle of your processor. I have made a little program which requests the …

Member Avatar for marco93
0
1K
Member Avatar for meshooo007

hi everybody i have a small problem. i want to create a telnet session to any other server and i want the socket client code that initiate connection with the server then i enter the password of server and last thing close the connection. could anyone please help me to …

Member Avatar for Nick Evan
0
114
Member Avatar for selsium

I am getting the below errors when I build the file in Visual studio, How can I resolve these errors? anyone can help me? Error 1 error C2660: 'strcpy' : function does not take 3 arguments 129 Error 2 error C2732: linkage specification contradicts earlier specification for 'pro_str_to_wstr' 1405 Error …

Member Avatar for Ancient Dragon
0
568
Member Avatar for karen_mayhem06

hello.can you please help me guys on these.. A company wants to transmit data over the telephone, buit is concerned that its phone could be trapped. All of the data are transmitted as four-digit integers.The company has asked you to write a program that encrypts the data so that it …

Member Avatar for songad
0
91
Member Avatar for bil050

I have a following code struct A { int x; A(int i) : x(i) {} virtual void a() {}; }; struct B: virtual A { B() : A(0) {} virtual void a(){} }; struct C: A, virtual B { virtual void a(){} virtual void c(){} }; The following code fails …

Member Avatar for kvprajapati
0
127
Member Avatar for GotCake

I was wondering if there is a way to make specified code, most likely a function, run before the program quits out due to the user logging out etc. I'm writing a Win32 app with no window in Dev C++. (if that makes any difference) I've been searching a bit …

Member Avatar for GotCake
0
147
Member Avatar for 141550

In a class use the new operator to crate a object of the class . Their constructor is used to allocat memory for the data member and fucntion , and distructor is use to free the memory . If we use delete inplace of distructor , will it work ???

Member Avatar for kvprajapati
0
119
Member Avatar for Yaserk88

High I am in Europe right now and here they treat their commas as decimals points. I am working with Visual express 2008 and I cannot find a way to read a file that has all commas for decimal points. I can read the numbers as a string, but than …

Member Avatar for Yaserk88
0
2K
Member Avatar for thr

Hello for my friends in daniweb class X { public: virtual void function( ) = 0; protected: int x,y; color cl; X-type type; char a; }; class X is abstract class. ---------------------------- class Y : public X { private: int counter; } class Z : public X { private: int …

Member Avatar for thr
0
77
Member Avatar for colmcy1

Hey All, another problem :) I am trying to write code that on hitting a button will open and program, a "ok" window appears when program is open so I want the code to keystroke RETURN. I am using MSVC 6 MFC. I have gotten (painfuly) to the stage where …

Member Avatar for colmcy1
0
122
Member Avatar for stockton

I have been asked to add a pause to an existing C++ program. The user does not want to use the Windows builtin scheduler for reasons they won't share with me. Is the correct way of doing this something like:- void Sleep(10000);

Member Avatar for necrolin
0
108
Member Avatar for xiikryssiix

I'm just wondering if anyone can take a look at my current program below and see what im missing. ive been working on it for so long that i'm just stuck and need another help to kind of get me going in the right direction. I'm trying to create the …

Member Avatar for iamthwee
0
111
Member Avatar for sdmahapatra

[quote]Hi all,I have written a program in c++ using visual studio 2008.I've create only one source file and written all the codes including header files within .cpp extension and program is running well.But I want to split this program like [code] .h extension [/code] be present into the header file …

Member Avatar for sdmahapatra
0
129
Member Avatar for Himani_29

hi, as i already discussed in my last thread that my exe is not working for large number of files but it is doing really well with fewer files. today i took a screenshot and got the following error... here is my code..i am even trying to put delay in …

Member Avatar for tux4life
0
117
Member Avatar for esesili

Hello All, I am trying to generate an array which has random integers and pass this array to a function to be able to print random integers. The code I have written is as below. Can you help me about that? Thanks [ICODE]#include <iostream> #include <ctime> using namespace std; void …

Member Avatar for tux4life
0
118
Member Avatar for esesili

Hello again, I am trying to generate an array which has random integers. Then I have to sort it and perform binary search. Below is my code so far. It gives error message (runtime check failure 2 stack around the variable num_arry was corrupted). When I define num_arry[10] instead of …

Member Avatar for tux4life
0
100
Member Avatar for barige rajesh

[code] int main() { int *ptr=new int (100); cout<<"p's add is "<<ptr<<endl; cout<<"value in p is"<<*ptr<<endl; delete ptr; // deallocation of ptr; cout<<"p's add is "<<ptr<<endl; cout<<"value in p is"<<*ptr<<endl; return 0; } [/code] Even the delete operator is executed, the last two output statements are working same the first …

Member Avatar for barige rajesh
0
226
Member Avatar for VernonDozier

I posted a program earlier today in response to another thread and noticed that I had forgotten to clean up/free the memory I used. Here's the program. [code=cplusplus] #include <iostream> using namespace std; int main() { int LIST_SIZE, NUM_CHARS_PER_ELEMENT; cout << "Enter number of elements in list: "; cin >> …

Member Avatar for wildgoose
0
183
Member Avatar for GooeyG

I am horrible at making UML diagrams.The only one that i can make are the class diagram. The reason why i struggle making UML diagrams is that i don't have the algorithming concept down. Can anyone give me any suggestions that could ease this process for me? Thanks...

0
104
Member Avatar for lancevo3

I am having trouble with my copy constructor for a Deque program I am writing. It just does not seem to be doing any copying anyone notice a quick fix on this? [code=cplusplus] Deque::Deque(const Deque& oldDeque) { dArray = new int[oldDeque.dMaxSize]; int sub = oldDeque.dMaxSize; for (int i = 0; …

Member Avatar for lancevo3
0
1K
Member Avatar for BattlingMaxo

I have been away from programming but now i have more time. I want to make a fish that moves with procedural animation (just programming no keyframing )The fish will have at least 3 bones so i can move it in a sine wave, once i get that i will …

Member Avatar for BattlingMaxo
0
124
Member Avatar for headedtomexico

I've done a little looking around and found a few different ways to do this, and I was looking less for technical help, and more for opinions before I dove into the code. The software I'm sending out doesnt get installed, its just unzipped and placed in random folders on …

Member Avatar for Ancient Dragon
0
150
Member Avatar for tazboy

list is supposed to be an array of pointers, so hopefully I declared that correctly. This function is supposed to read lines of text and each line of text should have a pointer pointing to it so that I can sort them. What I don't understand is when I read …

Member Avatar for VernonDozier
0
204
Member Avatar for dumrat

Hi, Can someone tell me how to suppress all the warnings g++ produces? Not specific warnings : I know how to do that. I want to not see any warnings at all when I build. Thanks.

Member Avatar for Tom Gunn
0
431
Member Avatar for laconstantine

My first school project after first year of c++ studying in 10 grade for summer to code virtual stack emulation in C++.. Well i've done it perfectly finished just today !! It supposed to be for all summer I finished in fast in 1 day lol not nerd :) Just …

0
92
Member Avatar for tazboy

Here is what I have: [CODE]} else if ( argc > 1 ){ for ( int arg = 1; arg < argc; ++arg ){ infile.open( argv[arg] ); if ( infile ){ list = read_file( &infile, &lines ); } } } [/CODE] argv[1] = text.txt gets opened, but argv[2] = text2.txt …

Member Avatar for tazboy
0
138
Member Avatar for naeem1973

i have a text file abc.text having 32 characters only. 2b7e151628aed2a6abf7158809cf4f3c i want to load this file in char *key[16] as below char *key[16] ={"2b", "7e", "15", "16", "28", "ae", "d2", "a6", "ab", "f7", "15", "88", "09", "cf", "4f", "3c"}; i use the following code char ch; int i=0; ifstream …

Member Avatar for kvprajapati
0
209
Member Avatar for jjplaw

Hi, i want to implement a windows service that functions as a simple license security feature for a software X. The service is meant to run independently from software X. [B]My current idea:[/B] [LIST]The service is like a timebomb for a software Z installed on the machine...[/LIST] [LIST]Whenever the user …

Member Avatar for tux4life
1
174
Member Avatar for Yaserk88

I am reading a file that has a column of words, but each time the column is read, the first letters are the only things that are outputed. Does anyone have any simple solutions to this? I don't want to have each letter be a separate variable. [ICODE]#include <iostream> #include …

Member Avatar for Yaserk88
0
116
Member Avatar for san_sarangkar

The End.