49,761 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 ??? | |
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 … | |
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 … | |
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 … | |
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); | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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 >> … | |
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... | |
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; … | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
|
The End.