49,761 Topics
| |
A criticism of the break and continue statements is that each is unstructured. Actually they statements can always be replaced by structured statements, although doing so can be awkward. Describe in general how you would remove any break statement from a loop in a program and replace it with some … | |
Let's start with 1 pipe such as ex: "ls | grep hello" What I'm trying to do is to split the *args[] into 2 that one contains "ls" (left-of-the-pipe command) and the other contains "grep hello" (right command) -> so I can execute the child pipe as producer and parent … | |
I want to create a menu. The files i have are main.cpp BMI.cpp and BFP.cpp. I want the program to use the BMI.cpp when 1 is pressed and the BFP.ccp when 2 is pressed. Here is my code so far. [CODE] #include <iostream> using namespace std; int main(void) { int … | |
can somebody help me with this program?? i have to program a matrix with n column and n row and it should be able to find a path moving like a knight in chess game(L) that touch every point of the matrix once. the program consist in enter the location … | |
Right, you're going to think I'm crazy but is Association like "Has is" For example: I have 2 classes, Teacher and Classroom, to create association would be: Teacher has a Classroom? Thanks | |
Please help, I don't know why it is not reading the file. I am working in VS C++ 2008, I saved "input_data.txt" in the header files, see below. What is wrong? #include <iostream> #include <fstream> #include <ctime> #include <cstdlib> #include "input_data.txt.h" using namespace std; class Node { public: int x; … | |
how to get string from other function? i tried this , but come error... i using Visual Basic C++.... [CODE] void main() { char name[51]; name=NAME(); } int NAME() { char names[51]; names="john"; }[/CODE] | |
I would like to implement a method to add,delete an item on a order list, and print the order total for an order. The attributes are part_number,part_name,part_price. Please give me an idea of how it is done | |
The code is evaluating a expression tree. My issue is on line 57 when I try to dynamically allocate an array to be used as the nodes in the expression tree, the compiler gives the following error: tree.cpp(58): error: no suitable constructor exists to convert from "ExprNode *" to "ExprNode" … | |
The program runs but has a logic error how can I fix it? and I need to finish the header block on the function, but I don't know how to, can anyone help [CODE] #include <iostream> using namespace std; // Function prototype bool searchList(long [], int, long); // Constant for … | |
can somebody help me with this program?? i have to program a matrix with n column and n row and it should be able to find a path moving like a horse in chess game(L) that touch every point of the matrix once. the program consist in enter the location … | |
// Tuba.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <stdlib.h> unsigned char** pgmRead(char *fileName) { unsigned char **pixel; int versiyon; int yukseklik; int genislik; int griSeviyesi; char yorum[256]; int head[3]; char c1,c2; char ch; unsigned char *block; int i,j; FILE *inf; inf = fopen(fileName, … | |
Hi, this is one of my hw problems for the week and having trouble writing this code.-- QUESTION: 1. Create a program that will generate a 10 question math quiz for single digit addition. Your program should create 2 random numbers in the range of 0 – 9 and then … | |
Hello! May I know about Double Queue with complete examples. thank you. | |
This is basically my code. It says build succeed, but I get nothing. What am I doing wrong. The user inputs a sentence, for example, Hello. (I've taken out other parts such as return LOWERCASE, return DIGIT, and what would happen in those cases for ease of reading). The program … | |
I have a 2D vector of different values. It could be text or numbers. I need to be able to see what is in the vector and to do something depending on what is in there. How do i access each element of the vector and add to a temp … | |
Hello all, I'm currently using Windows Vista and Visual Studio 2008 to develop my code. I'm working and a very big project and I'm looking for a good profiler for performance analysis. Any recommendations? It would also be nice to keep the solution as low cost as possible (free is … | |
Please Help I want c or c++ code to solve 8 puzzle problem using depth first search and breadth first search and each search print out cpu time and memory space of the queue | |
Hi, I'm trying to encrypt a simple .txt file. What I want to do is is described by the function definitions. I want to change all my characters in the .txt file to lower case and then convert any digits found into *. I've done this before in the past, … | |
so i'm stuck in creating a do/while menu doing this. menu option 1 - use the for loop menu option 2 - use the while loop menu option 3 - use the do/while loop in each option, print the numbers from 1 to 10 I made my functions like this. … | |
[code]#include <iostream> using namespace std ; class Singleton { public: // Implement the logic here to instantiate the class for the first time by validating the // member pointer. If member pointer is already pointing to some valid memory it means // that the first object is created and it … | |
[COLOR="Green"][B]salam i m new here. i m student of MIT. the basic problem is with that i cant understand the statement of proagram that what i have to do in it. and theoratical i know what is cin, cout, headerfiles etc but not very much. so i ve to submit … | |
I am writing a game code and I keep getting these erroes 359 E: Game.cpp redefinition of `void PlaceYourBet()' 155 E: Game.cpp `void PlaceYourBet()' previously defined here can anyone help me out with these errors I know it must be simple. | |
Hey there, I'm taking a C++ class and got a two staged assignment to hand in soon. I'mhaving troubles with it and was wondering if anybody could lend me a hand? We are to design and implement a web forum in C++. It is supposed to be a stand-alone application, … | |
I was wondering if it was possible to use c++ to associate a specific icon with a custom file type. for example, I create a file with fopen(testfile.rider, "wb"); It creates a file with an extension of .rider, but it has the default unkown file type icon. Is there a … | |
I was running into run time errors, and stripped down my code to isolate the problem. From that I was able to write this little piece of code to demonstrate my issue: [CODE] #include <windows.h> class test { private: int a; public: test(); void run(); }; test::test() { a = … | |
It has no errors or warnings but nothing is working what could be the problem and the assignment says that I need to a finish commenting the function header blocks. ( i don't know what that is and I don't know if this is the reason that it is not … | |
i got a problem on get data from other function, i know can use a return... but i forgotten how to code the return.... can show me a example of source code ? [CODE]void main(){ perform data() //how can i get the "name" from data function?? } int data(){ read … |
The End.