49,757 Topics
| |
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] | |
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 … | |
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 … | |
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". | |
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 … | |
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 … | |
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 … | |
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 … | |
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, … | |
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 … | |
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; … | |
[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 … | |
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 … | |
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) … | |
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 <= … | |
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 … | |
#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 … | |
[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 … | |
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 --> … | |
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 … | |
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 | |
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 … | |
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 … | |
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" … | |
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 … | |
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 … | |
[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" … | |
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 … | |
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 … | |
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? |
The End.