49,761 Topics

Member Avatar for
Member Avatar for ftl25

Hi, How do I check if a member of a struct is null? I've tried: [CODE]if(ErrorInfo->TestName != NULL)[/CODE] The above method returns true even when [B]ErrorInfo->TestName[/B] contains nothing (debug shows it as 0xccccccc, ""). [CODE](!(strcspn(ErrorInfo->TestName, "") == 0))[/CODE] The above method throws an access violation. I've tried other ways too …

Member Avatar for ftl25
0
9K
Member Avatar for badllama

Okay, I’ve got a noob question. It’s been awhile since I coded so I thought I’d start off at the beginning and create a template list and tree. Back in the old days I left the nodes open, but I wanted to keep the data private this time. My first …

Member Avatar for Valaraukar
0
227
Member Avatar for tongdl04

Hello, I am a newbie in C++ programming. I try to write a C++ program to first read and split a hugh text file (that containing multiple small files inside it) into multiple small text files, then I need to write the first line of each small text file into …

Member Avatar for tongdl04
0
556
Member Avatar for homeryansta

[CODE=cpp]void BOARD_Unselect_All(System::Windows::Forms::Form^ Frm) { Frm.a1->BackgroundImage = Image::FromFile("elephant_pla.gif"); }[/CODE] a1 is a picturebox from the form. How do you use the buttons, picturebox, etc from the form being passed in?

Member Avatar for Milton Neal
0
198
Member Avatar for Rajesh1978

Hi, I am new to ACE. I want to use ACE library. I have seen so many codes. But if there is any document which explains elaborately about the macros then it will be useful. Like how to use ACE_DEBUG, ACE_ERROR. READ_MASK etc Please help

0
40
Member Avatar for bookmark

[CODE]// #include <iostream> using namespace std; #include <cmath> #include <math.h> int main() { float a, b, c, t, s, area; cout << "Enter the lengths of your triangle's sides: "; cin >> a >> b >> c; if(a>b) {t=a; a=b; b=t;}; if(b>c) {t=b; b=c; c=t;}; if(a>b) {t=a; a=b; b=t;}; if((c*c) …

Member Avatar for bookmark
0
216
Member Avatar for madankumar

Hi This is Singleton class program, please let me know any changes required in this code............... #include <iostream> using namespace std; class Singleton { private: static bool instanceFlag; static Singleton *single; Singleton() { //private constructor } public: static Singleton* getInstance(); void method(); ~Singleton() { instanceFlag = false; } }; bool …

Member Avatar for MyNameIsLJ
0
195
Member Avatar for karishma10

hello, i am a beginner to visual studio. i want to know how can i use pthread in visual studio 2008. am i supposed to download the dll? if yes, then after downloading how can i use that dll in my project. please help. Karishma.

Member Avatar for ekailan
0
955
Member Avatar for keekee769

I need help...This is the class i am supposed to use... [CODE]#ifndef_MINESWEEPER_H #define_MINESWEEPER_H #include <iostream> #include <ctime> #include <cstdlib> using namespace std; const int SIZE = 3; class minesweeper { public: minesweeper(); minesweeper(int mines); void resetGame(); int flagCell(int x, int y); void unflagCell(int x, int y); int uncoverCell(int x, int …

Member Avatar for keekee769
0
102
Member Avatar for shafik_s

Hi everybody I defined an array pointer to hold a massive amount of data, (actually the RGB data of a screen with 1024*768 pixels). the data is assigned from another temporary array to the this array within a function that calculates the values of the temporary array and then assign …

Member Avatar for shafik_s
0
203
Member Avatar for jogieglenmait

I have a problem with my console program. I have a text file named "myRecord.txt" with the following contents: 101,Carlito Caballero,500.00 102,Tina Gamboa,560.34 103,Angel Caballero,750.55 104,Kyla Shane,850.32 105,Jogie Glen Mait,1000.00 If I run the program, the console should prompt the user to enter the id number (which is the set …

Member Avatar for jogieglenmait
0
372
Member Avatar for warzone

[I]<<edit: [URL="http://www.daniweb.com/forums/post191005.html#post191005"]split from here[/URL]>>[/I] Hi. My i ask something?,,can you help me please to solve this Problem? How Can i call Full Record using strtok and strcmp in text file Please!!!! [CODE]101, Carlito Caballero, 500.00 102, tina gamboa, 560.34 103, angel caballero,750.55 104, kyla shane, 850.32[/CODE] Here's the code [CODE]#include …

Member Avatar for jogieglenmait
0
480
Member Avatar for rebellion346

I'm working on a prototype program for my class assignment. I didn't wanna jump into it quite yet until I understood how functions worked so I decided to make this. It's going pretty well and now what I'm trying to do is make it so the program takes user input …

Member Avatar for rebellion346
0
112
Member Avatar for kakaliki

I am mostly familiar with C++. :?: Please help. Question is below : Write a program to discover how many numbers between 1 and 40 can be expressed as the sum of 4 positive squares (e.g. 15 = 12 + 12 + 22 + 32).

Member Avatar for kakaliki
0
266
Member Avatar for aman rathi

hello everybody hi im a student of SGRRITS (my institute) in my inst we have turbo c++. is it a good platform for doing programming now a days and does any industry us it now a days. no.2: please can you suggest me its substitute which are better than it. …

Member Avatar for aman rathi
0
110
Member Avatar for Peter4n31

Hello. I am debugging a larger project and a tool called Crash Validator keeps pointing line 1 in my code extract:"inline bool SortKnownFiles2 (etc.)" in DirLoader.cpp Error message in Crash Validator is “Cannot create a file when that file already exists.” (in c++ it runs fine, except a few random …

0
75
Member Avatar for Suzie999

Is it possible to password protect a dll at compiletime. Please excuse my noobness, but let me explain what I mean. You app an runtine makes a lot of calls to a function in a library so it opens it and keeps it open for the duration your app is …

Member Avatar for Stefano Mtangoo
0
2K
Member Avatar for ziggystarman

Hello I'm looking to extract jpeg image data from a mjpeg stream, but I'm not sure how to do this in c++ . The code snippet below does the job of connecting to the remote ip camera server & receives the mjpeg stream via tempBuffer variable. [CODE] // Loop and …

Member Avatar for ziggystarman
0
2K
Member Avatar for suncica2222

can I use fopen,and fwrite with ShellExecute? to take file in buffer,drop it in directory and run it with ShellExecute I did this way but I just get cmd window and file is corupted do I have to use some API to take file in buffer?

Member Avatar for suncica2222
0
164
Member Avatar for peterman.k

I just started my mid level c++ class. In the past we have been using Visual Studio, which I can access thru a VM that our school supplies, so I can program from my Mac no problem. In this class, however, we are switching to a linux based programming tool, …

Member Avatar for jamillion
0
379
Member Avatar for burcin erek

[CODE]#include <iostream> #include <conio.h> using namespace std; main() { int a,b; b=50; cout<<"enter a value less than 50: "; cin>>a; do { cout<<"A number: "<<a<<endl; a++; Sleep(100); } while (a<=b); getch(); return 0; } [/CODE]

Member Avatar for Stefano Mtangoo
0
105
Member Avatar for saransh60

I did'nt understand here in this code i was reading a book and then const char *q="Hello"; //string is fixed pointer is not *q='M'// error q="bye"; //works char * const t="Hello"; //string is fixed pointer is not *t='M'// works t="bye"; //error so my question is in first if string is …

Member Avatar for nbaztec
0
97
Member Avatar for lukename

Hello guys. How can i get my file path? I konw my program's name but i don't know where it will be put. How can i get file path during program's execution? Thank you

Member Avatar for William Hemsworth
0
162
Member Avatar for kchyn

Hey guys, I have a question. I'm writing a script in c++ and want to have the script copy a file whose name was previously determined by the script to a output file who's name is determined through functions and procedures within the script. The whole script is looped until …

Member Avatar for nbaztec
0
194
Member Avatar for Luckychap
Member Avatar for burcin erek
0
1K
Member Avatar for sgw

Something that puzzles me in the following simple program: [CODE] #include <iostream> using namespace std; int main() { int row; cout << "enter row: "; cin >> row; int K[row], m[row][5]; cout << "Enter all the " << row << " K values:\n"; for (int i=0;i<row;i++) cin >> K[i]; cin.ignore(10,'\n'); …

Member Avatar for burcin erek
0
177
Member Avatar for stereomatching

i am curious about the unordered map of boost this is the first code I wrote [code = first] typedef pair<int, int> axis; typedef boost::unordered_map<axis, int> mCost; void testUnorderedMap() { mCost mc; axis p(0, 0); mc.insert(mCost::value_type(p, 3)); p.first = 0; p.second = 6; mc.insert(mCost::value_type(p, 33)); p.first = 0; p.second = …

0
45
Member Avatar for stereomatching

I need to store about 0.1million int into the unordered_map and need the key(int, int) to search them The size of the data are fixed, and I don't need to change the data so oftenly Search is much more often than insert(more than 20 times of insert) I try to …

0
39
Member Avatar for Bri426

I'm writing a program that asks the user how many numbers they would like to input, then proceeds to ask the user to enter the said amount of numbers. At the end, the program computes the sum, average, largest number and smallest number. I've got the entire program figured out, …

Member Avatar for gju
0
1K
Member Avatar for PierreK

Hello all, Im working on my assignment that deals w/ the use of classes but I'm a bit stuck at the moment. The assignment overview is fairly simple: I just need to read in a .dat file which contains some elevation data into a 2d array and then use that …

0
51

The End.