48,986 Topics

Member Avatar for
Member Avatar for YeMiller

Hi, I've had a quick look through this forum and can't really see anything to help. I've got a basic but fair knowldge of C++ but I'm unfortunately not very good at putting my knowledge into raw code :D. I'm currently doing an assignment to read data from one of …

Member Avatar for WaltP
0
141
Member Avatar for correaj

Good Day Folks! I'm having a difficult time getting this operator overloading function to work. I have try various syntax to get it to work. When I run the following code I get this compile error. [COLOR="Red"]g++ -Wall hmw6.cpp -o driver set.h: In instantiation of `correaj::set<int>': hmw6.cpp:9: instantiated from here …

Member Avatar for correaj
0
3K
Member Avatar for kira_

hello there. there's an error in my program that I cannot identify. Every time i call a function for my declared variable of type Stack, there will suddenly be a run time error. I really don't get what's wrong with my code because my implementation seems to be right but …

Member Avatar for mitrmkar
0
103
Member Avatar for NitaB

Hey guys! I must have some sort of logic problem that I'm just not seeing. I just want to read a file into a 2D array. The dimensions of the array are given by the very first line of the input file. Everything works hunky dorey except that when I …

Member Avatar for NitaB
0
106
Member Avatar for AltF4me

Hi everyone, I'm sure I'm doing something silly here! Basically my constructor creates a pointer initialised to null, then in one of my functions I create an integer array on the heap using the new keyword. Now basically I have a data structure that needs to be copied, like so …

Member Avatar for AltF4me
0
107
Member Avatar for ajsavoca

The assignment was to write a program that generated a random sequence of six non-repeating numbers between 1 and 53 until it matched a user inputted sequence (lotto). Here is the entire program. [CODE=c] #include <stdio.h> #include <stdlib.h> #include <math.h> #include <cctype> #include <iostream> #include <windows.h> #include <time.h> using namespace …

Member Avatar for ajsavoca
0
122
Member Avatar for B00t3r

Hi =) I'm a beginner with c + + so I have a small problem with Visual C + + When im typing } in vc + + it will not type } so I was wondering how do I fix this problem?

Member Avatar for strmstn
0
128
Member Avatar for mitch9654

I read somewhere else and found some code that had something like this in it: [CODE]char buf[] = {0};[/CODE] what does this do? thanks mitch9654

Member Avatar for mitch9654
0
61
Member Avatar for modyutd

hey am doing an assignment i need your help cause i reached something and i can't solve i have to make these stuff that i did to inheritance and polymorphism. the assignment is about I am required to design an Advisory System which models the academic advisor and advisee system …

0
47
Member Avatar for pinsickle

Hello, I am working on a merge sort but I keep getting the following error : ds07(6443) malloc: *** error for object 0x100100098: incorrect checksum for freed object - object was probably modified after being freed. I don't see what my error is with the creation and deletion of my …

Member Avatar for mitrmkar
0
81
Member Avatar for pinknblu

It provides the average grade of an student. Assignment: How many students are in the class ? 3 Enter five test scores for student number 1 80 90 70 90 80 The average for student number 1 is 85 Enter five test scores for student number 2 100 60 60 …

Member Avatar for pinknblu
0
184
Member Avatar for robski

Hi. I need some help with some code i'm writing. I'm new to c++ and to be honest i feel like i have tried everything but cant get this bit working. I've included the small part of the program i have so far. I still have a lot to do …

Member Avatar for robski
0
89
Member Avatar for tarheelfan_08

Hey guys, I have been trying to do some stuff outside of my class to learn a bit more and I have come across something called a vector. And I read online that its similar to an array! But I am not sure how to do this. I have been …

Member Avatar for mitrmkar
0
380
Member Avatar for juuuh333

Hello, I have Visual C++ 2008 in a Windows 7. I wanna get the value from a textbox to an int, after that I wanna make some operations with the int like + or - or * or / and I want to write it to an another textbox. And …

Member Avatar for juuuh333
0
3K
Member Avatar for jmoran19

I'm trying to write a program that builds a full binary tree from an array containing an even number of sequential numbers. I know the memory allocation part, I'm just having trouble with how to pass the integers to act as array positions. This is what I've come up with …

Member Avatar for rydhima
0
144
Member Avatar for juuuh333

Hello, I wanna create a string witch gets the value of a textbox. How can I make it ? THX for your replays :D

Member Avatar for juuuh333
0
598
Member Avatar for greedydeepak
Member Avatar for karanjaswal

Suppose I had a network of switches, or more generally, Nodes. Each Node has a method getNeighbors(), which returns a set of adjacent Nodes in the network. Write a function findNeighborhood(Node, n) which given a Node and int n returns all nodes no more than n hops away... I want …

Member Avatar for WaltP
-2
53
Member Avatar for LevyDee

So I finally decided to take on some Windows Programming, and everything is going fine, except this: Edit: using this tutorial [url]http://bobobobo.wordpress.com/2008/01/31/how-to-create-a-basic-window-in-c/[/url] [code] #include <windows.h> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { WNDCLASS myWindow; myWindow.cbClsExtra = 0; myWindow.cbWndExtra = 0; myWindow.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); myWindow.hCursor = LoadCursor(NULL, …

Member Avatar for nithy.sweety
0
515
Member Avatar for GooeyG

Whenever i type in code, Visual Studio puts an dot or a tab(->) in between code.I tried uninstalling and reinstalling Visual Studio, but that didn't do anything.I'm not quite sure what i did and i can't find a way to undo it. Thanks! P.s.-I tried to copy and paste the …

Member Avatar for GooeyG
0
84
Member Avatar for casjackkwok2001

HI ALL. I'M LOOKING FOR A SOLUTION FOR MY CODE. I WANT TO FIND THE [B]HIGHEST CHARGE[/B] AFTER AN ARRAY HAS SHOWN UP(SPEAKER'S FEE). WHAT CAN I DO?? THANKS HERE'S MY CODE: [CODE]#include "stdafx.h" #include <iostream> #include <iomanip> using namespace std; struct Bureau { char name[50]; // Name char phoneNum[50]; …

Member Avatar for WaltP
0
234
Member Avatar for fyp

so far I could manage to create OpenFileDialog and select the txt file. after that ,How could I display the contect of selected txt file into TextBox? [CODE] ************************************************************* private: virtual System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { System::Windows::Forms::DialogResult OK = openFileDialog1->ShowDialog(); } private: System::Void openFileDialog1_FileOk(System::Object^ sender, System::ComponentModel::CancelEventArgs^ e) { ???????????????????????????????? …

Member Avatar for fyp
0
643
Member Avatar for hurricane123

Why should a function that accepts an array as an argument and process that array,also accept an argument specifying the array's size?

Member Avatar for WaltP
0
60
Member Avatar for SCoder1

How would I loop a switch statement until one of the valid options are entered. would this work? example: [code] // lets just say all the necessary starting code is already here.... int choice, number; do { cout<<"please enter a number from 1-3\n"; cin>>number; switch(number) { case 1: break; blah …

Member Avatar for WaltP
0
92
Member Avatar for f0rd

Hi everybody, I'm trying to develop an application for personal use, that will just make my life at work a lot easier and save me from doing a repetitive process by hand, when I know it could be done with [B][I]relative [/I][/B] ease in C++. Anyway, I want to be …

Member Avatar for WaltP
0
281
Member Avatar for dzruptz

well so i've made a simple wrapper class to facilitate uploading a text file to my server.....and i can't seem to find the problem.....would anyone be kind enough to see where i did wrong? HTTPPost wrapper class: [CODE=c++]#ifndef _HTTP_POSTER_ #define _HTTP_POSTER_ #include <windows.h> #include <wininet.h> #include <tchar.h> #include <fstream> #include …

Member Avatar for dzruptz
0
88
Member Avatar for athlon32

Hello Daniweb! I'm coding a small application and I've hit a road block. I've been using C++ for almost two years now, but to be honest, I hardly use dynamic polymorphism (i prefer static), and so with great embarrassment, I come here to ask this: My code is basically structured …

Member Avatar for jonsca
0
132
Member Avatar for tinkeydo

The following is an excerpt from a complete program that runs without any errors. It has 2 file dependencies which it uses to access and store information. The program, in its entirety, displays a menu with 4 options the user can choose from. [LIST=1] [*]View Characters [*]View Items [*]Add Character …

Member Avatar for tinkeydo
0
170
Member Avatar for sbdblyss

Hello, I am currently working on a project that requires me to write write a program that adds, subtracts, multiplies and evaluates polynomials. I am required to use linked lists of nodes. I am stuck on writing the code to input the polynomial. I understand how I will input each …

Member Avatar for Lerner
0
110
Member Avatar for yapkm01

I know that this book is for C++ Primer 3rd Edition (Stanley Lippmann) but can this be used for C++ Primer 4th Edition. There is no C++ Primer answer book for the 4th Edition. Still comtemplating if i should get it. :?:

Member Avatar for Spartan-S63
0
143

The End.