49,761 Topics

Member Avatar for
Member Avatar for techie929

Hi everyone, I am trying to save ip addresses and mac addresses of a node in a structure.I dont know how to assign values.Please help. [CODE] #include <stdio.h> #include<iostream> #define nodes 15 using namespace std; struct nodes_struct { char ip[19]; char mac[19]; } ; int main() { char ip[19],mac[19]; nodes_struct …

Member Avatar for shashwat_2010
0
133
Member Avatar for Jfunch

I'm suppose to write a program that asks the user to enters numbers which will be stored in a dynamic array. Then once they enter their first set of numbers they are asked whether they would like to enter another number or remove a number from their list. You can …

0
59
Member Avatar for Extremus

[B]System:[/B] Vista What I want to do is to catch the mouse release event, which I have researched for but nothing useful came up. I found out the way to catch the pressed event: [CODE] #include <windows.h> #include <iostream> int main() { // Grab a handle to the console inputbuffer …

Member Avatar for Extremus
0
1K
Member Avatar for sana zafar

Hi all, Im having a little trouble. I have to write a program that will input a string of positive integers terminated by a negative integer and then sort it.I have done the sorting part and it works fine.But the part that the string continues to get integers unless a …

Member Avatar for sana zafar
0
94
Member Avatar for Stefano Mtangoo

I have this question and might look stupid indeed, but bear with me. I have files in this hierrachy ProjectFolder/Panel/panel.h ProjectFolder/Panel/panel.cpp [B]AND[/B] projectFolder/Search/search.h projectFolder/Search/search.cpp I want to include search.h in panel.h I have tried many thing including [CODE=C++]#include "./search/search.h" #include "../search/search.h"[/CODE] but I have failed. Any suggestion on how to …

Member Avatar for Stefano Mtangoo
0
65
Member Avatar for thomasekugm

I am writing a small algebra io program for an intro to c class and i am stuck. The idea is to get the user to input (a * b) + (c / d) + (e % f), in exactly the same format as you see it with the exception …

Member Avatar for jephthah
0
228
Member Avatar for saltysnack

So I'm trying to simulate some mouse clicks using WM_LBUTTONDOWN, BN_CLICKED, and WM_LBUTTONUP i looked it up on the MSND site and all i got was [url]http://msdn.microsoft.com/en-us/library/ms645607(VS.85).aspx[/url] which is not very helpful to me at this stage of my C++ knowledge. can someone help me out and tell me how …

0
82
Member Avatar for Ancient Dragon

I'm putting my Q. here instead of the c++ board because this is not a c++ question, but rather a compiler question. I just installed vc++ 2010 express and the first difference I noticed is that Microsoft removed the Build menu and all its options. Now there is only one …

Member Avatar for jwenting
0
127
Member Avatar for ankur021190

i`m using turbo c++ in windows vista & not able to get outputs for programs with graphics involved in it as part of computer graphics subject . Is it that it doesn`t support graphics .if,yes then can i use dosbox for executing those programs

Member Avatar for Ancient Dragon
-1
61
Member Avatar for Whizzy

Good day all. I am trying to write a c++ rpg game, learning c++ as I go. As I understand it, the example below is a basic class, and I can access my variables with dot notation. Along with the class functions or methods if you wish. Thats all fine …

Member Avatar for NathanOliver
0
106
Member Avatar for n.utiu

Let's say we have this code : [CODE]#include <iostream> #include <boost/python .hpp> using namespace boost::python; class A{ void foo (void) { std::cout << "Hello World"; } }; BOOST_PYTHON_MODULE(hello) { class_ <A> ("A") .def("foo", A::foo); }[/CODE] and I have an object of type A named MyCPPClass and I want to make …

0
60
Member Avatar for yznk

I am writing a program that implements a topological sort. The actual question is as follows : Given a collection of n items and dependency lists for each item, determine whether the dependencies support a topological sort. If not, report this fact. Otherwise, find a topological sort of the vertices …

Member Avatar for yznk
0
113
Member Avatar for yahooak

Hello. I just want to know if i have a file on my disk named 'c://blahblah/mypic.bmp' & want to show it via a Turbo c++ program. How to do that? i have googled it, but no solution.

Member Avatar for Stefano Mtangoo
0
105
Member Avatar for CppBuilder2006

I have a problem with this Window Procedure. in new versions of Windows OS, when I run the program, at first everything is painted & then paintings disappear (until the window receives the next paint message) [CODE] long _stdcall WndProc ( HWND hwnd, unsigned msg, unsigned wParam, long lParam ) …

Member Avatar for CppBuilder2006
0
150
Member Avatar for rahul8590

I have an array, which i want it common to both the f1.cpp and f2.cpp . since f1.cpp will be used to store some values in it and f2.cpp has to use it for some other computations , is there any way i can share these 2 variables . well …

Member Avatar for WaltP
0
259
Member Avatar for ahmed.123

char fileName[100]; cout <<" please enter the name of the data file "<< endl; cin>>fileName; ifile.open(fileName); 1 how to put data in the filename (how to put numbers in the filename e.g lets name it sample.txt where to put this sample to be readen by the program 2. how to …

Member Avatar for pinsickle
0
96
Member Avatar for pinsickle

Hello, I'm working on a problem (Huffman Tree encoding/decoding) and I need to covert and Int to a char. I was trying to use [CODE] char temp = static_cast <char> (index); //index is an integer [/CODE] it compiles but if I try to print, it crashes so obviously that idea …

Member Avatar for jonsca
0
260
Member Avatar for fugnut

I am writing a hangman program for class and so far I am able to read in and randomly pick a word from the file. The problem I am facing is counting the number of letters in the chosen word. Once I get that I can work on the rest …

Member Avatar for jonsca
0
187
Member Avatar for bgx90

I am trying to place a friend function of a template class named sort in its own header file. I keep getting errors when compiling my test program. I have tried different things to fix it, but nothing works. My experience with template classes is limited as is my knowledge …

Member Avatar for bgx90
0
236
Member Avatar for Helpgirl

Hi everyone, i would like to use your help from my programming c++ assignmnet. am trying to do it, and i have to do this assignment because its my last hope to pass the course, because my dr. told me if i didnt do it correctly i will fail so …

Member Avatar for Ancient Dragon
-2
151
Member Avatar for angel19

hi, I have a simple monopoly style board game ready (in c++). I would like to ask you how can I add additional features to the game play such as ‘chance’ cards and ‘shake again’ squares. Is it possible to create a GUI interface for this game too? At the …

Member Avatar for angel19
0
111
Member Avatar for gnarlyskim

Having issues with this program. I've been trying to identify all the areas where data is created, then tried to destroy it likewise after using it. I've put a lot of delete[] coef (coef is a pointer double array to hold coefficients). The program will run half the time, then …

Member Avatar for gnarlyskim
0
125
Member Avatar for Lukezzz

Hello, I am using a button event to activate a backgroundworker that will copy a string to the Clipboard. When debugging the code, I get this error for the Clipboard line in the backgroundworker. I am not sure what this meens or what I need to do here. I have …

0
68
Member Avatar for Lukezzz

Hi, I wonder if there is any syntax that can detect if any Browserwindow is open on the computer and then close this/these windows. I use Firefox and then would want to detect if any Firefox browserwindow is opened and then close them if any is open. Thank you!

Member Avatar for Lukezzz
0
108
Member Avatar for caffeine

In VBA, I create a 3-D array of doubles of dimension (6, 100, 240). The dimensions of the 3-D array is (0 to 5, 1 to 100, 1 to 240). Here is what a VB watch of the 3-D array looks like: [CODE]ir Variant/Variant(0 to 5) ir(0) Variant/Variant(1 to 100, …

0
79
Member Avatar for fugnut

what AmI missing? I am simply trying to read in an array from a txt file and count the words. What am I doing wrong....here is the function[CODE]int countwords(ifstream& infile, int wordcount[MAX_WORDS]) { int count = 0; for( int i=0; i < MAX_WORDS && infile; i++) { infile>>wordcount[i]; count++; } …

Member Avatar for Ancient Dragon
0
83
Member Avatar for masumeh--

hello i calculated the run time of my program by clock instruction but when i run the program for one input in several times, the run time of program is different from previous.

Member Avatar for Ancient Dragon
0
48
Member Avatar for Blue$kull

I found a tutorial of how to link object files: I have 3 different files. [B]main.c[/B] [code=c] #include<stdio.h> #include"reciprocal.hpp" int main (int argc, char **argv) { int i; i = atoi (argv[1]); printf ("The reciprocal of %d is %g\n", i, reciprocal (i)); return 0; } [/code] [B]reciprocal.cpp[/B] [code] #include<cassert> #include"reciprocal.hpp" …

Member Avatar for Blue$kull
0
386
Member Avatar for modesto916

Good Afternoon, I am from brasil, and i am beginning to study programming, I bought the book "C++ How To Program", and i am now trying to make a small software with each class in its file, with prototypes and etc, here is a simple program that i made to …

Member Avatar for modesto916
0
168
Member Avatar for imunk123

When you read a long document, there is a good chance that many words occur multiple times. Instead of storing each word, it may be beneficial to only store unique words. Write a program that implements this strategy. Read a word at a time from cin. Keep a vector<char*> of …

Member Avatar for WaltP
-1
103

The End.