49,757 Topics

Member Avatar for
Member Avatar for Stefano Mtangoo

I have been discussing with python guys and it seems as if I need help from C/C++ guys. Pse consider to visit the link and say anything you can say about the problem Thanks [url]http://www.daniweb.com/forums/thread160430.html[/url]

0
57
Member Avatar for cherryteresa

Hi there. I had to make a code to print out a Pascal Triangle. But I'm not getting it to display properly. For example, if the user types in 4, then it will print: 1 1 1 2 1 3 3 But it should print 1 1 1 1 2 …

Member Avatar for cherryteresa
0
289
Member Avatar for azagorath

hey guys , i am trying to write this program , the program has 3 arrays char source[]="abcdefghijklmnopqrstuvwxyz"; char target[]="jfghdfsdyncdbdfklhdslasudfds"; char line[26]; now i have to ask the user to enter a line cin.getline(line,26) what i want to do is to check the characters in the user input(line) if it …

Member Avatar for azagorath
0
264
Member Avatar for Lukezzz

I have a dataGridView with 12 columns. What I want to do is to be able to rightclick a columnHeader where this column will be selected when doing this. How could this be possible ? Also I cant find any event for "RightClick".

0
47
Member Avatar for teddybouch

This one's got me really confused, but hopefully y'all will see something I can't for lack of experience and expertise. The following segment of code is part of a larger function that performs a Hough Transform on a series of coordinates to find lines described by the points. I'm looking …

Member Avatar for teddybouch
0
118
Member Avatar for Martin88

Hey hi I have a problem with to C++ programs for my final project, the problem is that i tried to make the code but first the C++ program say general protection exception i read some of this but i still think that the structure of my program is not …

Member Avatar for Martin88
0
192
Member Avatar for geekru2

Hi, I am coding a c++ based simulator, for which i need to implement a message queue. The structure of the problem is such. We have a program that contain a "queue" of messagePacket messagePacket in this case is a [icode] pair <int , message> [/icode] where message is a …

Member Avatar for StuXYZ
0
168
Member Avatar for Freaky_Chris

Hi, i'm doing some work with double atm and i have what appears to be a simple expression. When i work this out in my head i get the answer to be 0. However running the code gives me a very obscure value -5.77338e-017 Any help as to what i …

Member Avatar for StuXYZ
0
261
Member Avatar for teddybouch

I'm having trouble with passing a linked list between functions. I did some research online and found a few things, one of which was here, that led to the conclusion that I am not passing my linked list by reference. However, I have tried numerous different syntaxes to do this, …

Member Avatar for teddybouch
0
113
Member Avatar for NinjaLink

Hello all, My objective is simple. I have to take in 2 positive integers and multiply them by using addition. This is a recursive problem. Example of Output: [B]Please enter 2 positive integers to multiply: 4 2 4 * 2 = 8[/B] The problem is whenever the user types in …

Member Avatar for mrboolf
0
750
Member Avatar for lmastex

Hi. Can you guys help me out with this link list method. The method issuppose to say if a list is in ascendent order or descendent order. I have this right now: [CODE] template <typename ListElement> int List <ListElement>::order() { NodePtr temp1; NodePtr temp2; temp1 = Head; temp2 = temp1->Next; …

Member Avatar for lmastex
0
134
Member Avatar for acperson

[B]*When I compile the program it works. However, when I try to run the program, it outputs the first message then gives me the following error-*[/B] CSCI112LAB2.exe has encountered a problem and needs to close. We are sorry for the inconvenience. [B]*And when I tried to debug it*[/B] Unhandled exception …

Member Avatar for acperson
0
2K
Member Avatar for acperson

I wrote a program for a class assignment that is supposed to use random number generator to produce sentences. The program has to use four arrays of (pointers to char) and each chosen word must be concatenated to the previous words in an array that has to be able to …

Member Avatar for acperson
0
3K
Member Avatar for ALAZHARY

Hello Everyone, I found the following code somewhere, I understand it but I have trouble with understanding the sequence of execution, in other word, How can I monitor every little step of the function like that?[CODE]void EatSpace(char* Pbuffer) { int i = 0; int j = 0; while((*(Pbuffer + i) …

Member Avatar for Laiq Ahmed
0
176
Member Avatar for dr.eu

Hi! I have to write program, who print Triangle made with numbers from 1 to 9,like this: 1 21 321 4321 54321 654321 7654321 87654321 987654321 I wrote code: [code] #include <iostream.h> #include <stdlib.h> int main() { int first, last; cout << endl; for (first = 1 ; first <= …

Member Avatar for dr.eu
0
178
Member Avatar for AdRock

I would like to know how i check the first character of each line before I either ignore it and move onto the next line or add it to an array. What i am looking for is tags like <. If the line begins with that i move onto the …

Member Avatar for ArkM
0
3K
Member Avatar for pochacco

#include <iostream> using namespace std; int main() { double num_one, num_two, num_three, num_four, num_five, num_six, num_seven, num_eight, sum, product, average; char ans; cout << "Please enter eight numbers: "<< end; cin >> num_one >> num_two >> num_three >> num_four>> num_five >> num_six >> num_seven >> num_eight; cout << "The sum …

Member Avatar for Salem
0
124
Member Avatar for Se7Olutionyg

[code] #include "magic.h" #include <conio.h> #include <iostream> using namespace std; int main() { float throttle; float frate_; const float time = 10000; float vvel_ = 5; cout << "Hey, this is starfleet, your orders are to safely land this ship" << " with a " << endl << "velocity greater …

Member Avatar for Salem
0
96
Member Avatar for benji_k

Help! I'm trying to solve a quadratic equation I keep getting the error : term does not evaluate to a function taking 1 arguments Heres the program. I highlighted the problem line // Macros 3 - finding the root of a quadratic equation // ax^2 + bx + c --> …

Member Avatar for benji_k
0
142
Member Avatar for sid78669

This one is really crazy cause i think my professor screwed it up. I have to write a class Bank. It contains objects savings of class Account. now say i have a savings array and a savings object has [code=cplusplus] Account savings = new Account[5]; //How do i return the …

Member Avatar for sid78669
0
208
Member Avatar for Manutebecker

for(int n = 0; n<blocksx;n++){ for(int x = 0; x<blocksy;x++){ I just want to be able to shorten this into something easy so I could just type in like one word to get it to work, it is used a lot and sucks to retype... thx

Member Avatar for Ancient Dragon
0
118
Member Avatar for smeezekitty

i have three problems first one is in vc++ 2008 express heres the code [code=c++]#include <windows.h> #include <iostream> #include <stdafx> using namespace std; int _tmain(){ console::writeline("Window Text"); } [/code] Second is in old turbo C++ 1.01 how can i use a similer to if ( X = X) for char …

Member Avatar for smeezekitty
0
146
Member Avatar for MattEvans

If I add default arguments to the end of my copy constructor, is it still considered a copy constructor? E.g. will it still be used in the places where a copy constructor would normally be used (or automatically generated). I can verify that it works on one compiler (g++). That …

Member Avatar for MattEvans
0
218
Member Avatar for christiangirl

I'm having trouble making this program with linked lists work. Where I am having a problem is in printarea() [code] //**************************************************************** // This program tests creating dynamic linked list of // several Dynamic (descendents) // It uses: shape1.h header file // Filename: prtshape.cpp //**************************************************************** #include <iomanip> #include <iostream> #include "shape1.h" …

Member Avatar for christiangirl
0
152
Member Avatar for shamila08

hello, dear all [code=cplusplus] #include <iostream> #include <stdio.h> using namespace std; int count = 1; void print( int *arr, int SIZE){ if (arr != 0) { for (int i = 0; i < SIZE; i++) { // i = position cout << arr[i]; } cout <<"\n"; } } void circular_left(int …

0
139
Member Avatar for robgeek

I have an assignment to implement a salesperson class. Here is the layout I got from prof. My questions are typed in red between function prototypes. Any help is appreciated. Thanks. [code] cClass Salesperson { public: Salesperson(); //default constructor [COLOR="Red"]// I know that a default constructor is suppose to set …

Member Avatar for vmanes
0
142
Member Avatar for gotm

[CODE=C++]#include <iostream> #include <fstream> #include <vector> #include <string> #include <sstream> #include <stdio.h> #include <time.h> using namespace std; bool StringToInt(const string &s, int &i); int main() { // opening up and setting up the input file stream so we can read it // to perform the "account info" and the "history" …

Member Avatar for nmaillet
0
93
Member Avatar for Nyaato

Hello guys, I'm new here, and this is my first post in this forums. Please bear with me if I can't explain what I'm in need of well. Basically, this is part of my assignment, and I'm supposed to find a path from one end to the other in a …

Member Avatar for Lerner
0
183
Member Avatar for Freaky_Chris

Hi all, i'm looking into doing a little bit of work with the mouse in console applications on windows. I'm using windows.h to get access to functions such as ReadConsoleInput. I've created a simple program that just prints a string whenever the left most mouse button is clicked. However sometimes …

Member Avatar for Freaky_Chris
0
194
Member Avatar for cinderla

hi, i need to read a file and to store contents in buffer. to read the first 8 bytes and to move the pointer to read the strings in that file. could any one help me?

Member Avatar for VernonDozier
0
90

The End.