49,757 Topics

Member Avatar for
Member Avatar for rstinejr

I was reading an old thread, [url]http://www.daniweb.com/forums/thread130436.html[/url], and saw the reply [INDENT][I]You are using a compiler with the world's best debugger. You don't need debug messages.[/I][/INDENT] Au contraire. If the problem you are debugging requires window focus to remain unchanged, then hitting break in the debugger will mess things up. …

Member Avatar for Ancient Dragon
0
105
Member Avatar for owenransen

I know that IsValidReadPtr and IsValidWritePtr existed. But I have a friend with a problem and I suggested that he looks at the handle values. Apart from INVALID_HANDLE_VALUE and NULL checking, is there a function which says "Yes, this is valid handle (maybe connected to some object)"?

Member Avatar for Ancient Dragon
0
166
Member Avatar for applepomme

I need to pass part of a string to function: [CODE] string original_string="my_name_original"; string wanted_string (original_string,7); //take "my_name" only my_func(wanted_string, other_var); //func: void my_func(string wanted_string, int other_var); [/CODE] This doesn't seem to work, the compiling was OK but the passed "wanted_string" is empty; When pass char*, it works fine: [CODE] …

Member Avatar for Narue
0
129
Member Avatar for Xorlium

Hi, If I have a std::vector of objects and I need to iterate through all its elements, is it faster to do: [code] for (vector::iterator i = myvec.begin(); i != myvec.end(); ++i) //blah [/code] or [code] for (int i = 0; i < myvec.size(); ++i) // myvec[i] blah [/code] Or …

Member Avatar for mrnutty
0
223
Member Avatar for madhub2v

i am using turboc c++ compiler .how to initialize the graphics drivers .pl let me know.

Member Avatar for daviddoria
0
133
Member Avatar for Jsplinter

I have data stored in a deque that I wish to write to disk using fstream. So far this is the test code I have written. [code] int j = 10000; deque<double> m_data; for(int i = 0; i < j; i++) { m_data.push_back(i); } std::fstream myfile; myfile.open ("data2.bin", std::ios::out | …

Member Avatar for Jsplinter
0
2K
Member Avatar for notmasteryet

I'm trying to solve a cryptarithmetic puzzle TOO + TOO + TOO + TOO = GOOD using a program. My solution to this, is to use a nested loop for each unique letter (in this case T, O, G, D). The loops would systematically assign the digits from 0-9 to …

Member Avatar for Lerner
0
272
Member Avatar for hsquared

ive implemented a couple of functions for an assignment for class. i have an add function which adds students, id's, and universitys and have "tried" to add a get id function which should search the list, find a specified id, then return it. unfortunately, when i try to run this …

Member Avatar for Narue
0
119
Member Avatar for Peter_morley

Hi at this part of the code at the default constructor codedateInception = 0; dateDeath = NULL: location = 0; I get errors and I know its because they are of a class. I don't know how to set it up to have values. Any help? Header File [code]#ifndef ACTOR_H_ …

Member Avatar for Peter_morley
0
113
Member Avatar for Peter_morley

Hi basically my problem is that I am getting what I believe to be is the address of the object but I want to get the value that is stored in the object. Below is the code I wrote. I've included Date.cpp and my main function file. Say if I …

Member Avatar for Peter_morley
0
399
Member Avatar for malvi

Hello.. I am using visual studio 2010 MFC. in my programm i need to set 4 bit value in hex. exaple: i have hex value 64, it should desplay 0064 A = 000A 3E8 = 03E8 Is there any function in vc++, which set 0 ? Thanks.

Member Avatar for malvi
0
229
Member Avatar for Lukezzz

How is it possible to get the Exception Error as a string in the catch event ? The thing is that I get an exception and now want to know what the problem is and what the exception is saying. [code] try { //some code } catch(Exception ex) { //How …

Member Avatar for kavitababar
0
167
Member Avatar for cableguy31

I'm writing a program that parses tcpdump output files. I have a tab delimited text file that contains MAC addresses and hostnames. How can I have the program search this file for a MAC address and then return the corresponding hostname? Any help would be appreciated. Thanks.

Member Avatar for cableguy31
0
213
Member Avatar for anjaly grace

[code=cplusplus] //////This is a copied code for insertion sort ///// It works for turbo c++ 1 ///// in windows. /// For students of nitc. // The program takes in size of array, and elements and sorts it. #include <iostream.h> #include<conio.h> //#define size 6 void insertion_sort(int x[],int length) { int key,i; …

Member Avatar for sim2
-1
297
Member Avatar for alexchen

I want to make a map. Suppose the map width is 15 and height is 20. After the map is ready, it would be use to write a map. My code is: [CODE] #include <iostream> #include <fstream> int**map; bool msize(int Height,int Width){ //add code return true; } bool draw_map(char* Filename,int …

Member Avatar for daviddoria
0
81
Member Avatar for samsons17

I got an assignment to be done.. Given a sequence of positive integers. You need to find the number of triples in that sequence. For this problem, (x, y, z) constructs a triple if and only if x + y = z. So, (1, 2, 3) is a triple, where …

Member Avatar for samsons17
0
225
Member Avatar for muze

hello guys...i have a LPTSTR variable and I want to show that on console how do I do that..Here is what I have but, off course it does't work..if it is tooo simple question, plz excuse me...thanx [code=c] lpszDevName = (LPTSTR)((LPBYTE)lineDevCaps + lineDevCaps->dwLineNameOffset); printf("%s",lpszDevName); [/code]

Member Avatar for muze
0
163
Member Avatar for wintercold

I'm a newbie in C++. How can I create a game of tic-tac-toe game using simple codes in C++? Any answers would be much appreciated.. Thanks!:)

Member Avatar for Greywolf333
0
3K
Member Avatar for praky

There is a header file called BITIO.H in C not a standard header file for bit related input output. Is there is similar different or advanced way in C++ to achieve a similar goal?

Member Avatar for Ancient Dragon
0
49
Member Avatar for Arthas

Hi, I am trying to use BOOST threads with SDL. I write a code and run, but the program does not run correctly(i.e i cannot move the output window and i have to force terminate it.) Also during compilation a warning is given as: [b]1>LINK : E:\Program Files\src\threading\example\Debug\example.exe not found …

Member Avatar for Stefano Mtangoo
0
483
Member Avatar for utkarsh009

everything worked for me in turbo c++ but not in g++. tell me why do i always have to use "using namespace std;" while compiling with g++? also there is no conio.h, so how do i use the command: getch () then?

Member Avatar for Ancient Dragon
0
183
Member Avatar for NewLegend

Hello I tried to delete all the Linked List But I can not so Is there a way to delete the all Linked List? [CODE]struct input { int id; struct input * next; }; typedef struct input ie;[/CODE] [CODE]class input_events { typedef struct input ie; private: ie *l; public: ~input_events(); …

Member Avatar for NewLegend
0
195
Member Avatar for Vllinator

Hi im trying to store the current date and time to a file. When i print it, it is in the US format - MM/DD/YYYY [code=c] #include <time.h> _strdate( dateStr ); cout << "Current date: " << dateStr << endl; _strtime( timeStr ); cout << "Current time: " << timeStr; …

Member Avatar for Ancient Dragon
0
164
Member Avatar for Vllinator

Hi im writing a function in a program that lets the user delete a specific record in a file, the user is also able to recover this record. The easiest way i found is when the record is deleted, the record will be set to deleted using bool. Then in …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for kuchick32

I have to make a call-by-reference and I already have all of the program and it works I just have a little problem. I don't know how to get the output to say what I want it to say. It needs to give me the street, city and zip that …

Member Avatar for Ancient Dragon
0
111
Member Avatar for didijc

Hey everyone... I need some help...please... Using the web browser control, I want to navigate to a URL and move my mouse over ANY element on that website and have a focus rectangle display around it... I've written a whole bunch of code but none of it seems to work …

Member Avatar for didijc
0
174
Member Avatar for praky

I want to know the differences in between two? also is this code equivalent [CODE] char ch; FILE *fin; ch = fgetc (fin); [/CODE] [CODE] char ch; ifstream fin; fin>>ch; [/CODE]

Member Avatar for brandonrunyon
0
423
Member Avatar for iw2z

Hi everyone, I'm doing a little project after a long period of no c++, so please forgive me for any possible stupid mistakes. Basically I have 2 cpp files, in first.cpp I define namespace 'myNS', and in second.cpp I define class 'myClass'. The problem is that I have a pointer …

Member Avatar for mike_2000_17
0
263
Member Avatar for winnie89

Hi! i was wondering how I could make sure that the user inputs the proper values in my code. I've been looking online and seen things like cin.good() and cin.fail() but the explanations aren't really straightforward and a little confusing. I was wondering if anyone could help me implement the …

Member Avatar for mrnutty
0
243
Member Avatar for glenn612991

this is the program #include <iostream> using namespace std; int main() { int digits; cout<<"Enter 10 digits wether positive or negative: "; cin>>digits; //i dont know what to use so that i can separate positive and negative numbers and display it on screen.. //help me pls.., }

Member Avatar for Vllinator
0
2K

The End.