49,761 Topics

Member Avatar for
Member Avatar for alexa868

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 …

Member Avatar for BeyondTheEye
0
94
Member Avatar for dmitriylm
Member Avatar for jerrytouille

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 …

Member Avatar for jerrytouille
0
206
Member Avatar for skarocks47

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 …

Member Avatar for skarocks47
0
125
Member Avatar for nick30266

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 …

Member Avatar for boblied
0
117
Member Avatar for Phil++

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

Member Avatar for boblied
0
150
Member Avatar for Gem74

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; …

Member Avatar for Fbody
0
240
Member Avatar for rino699

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]

Member Avatar for Tom Gunn
0
130
Member Avatar for antonywere

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

0
54
Member Avatar for mike.bauer

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" …

Member Avatar for mike.bauer
0
227
Member Avatar for rookanga

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 …

Member Avatar for Fbody
0
126
Member Avatar for nick30266

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 …

0
79
Member Avatar for firtina

// 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, …

0
55
Member Avatar for ninatech9

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 …

Member Avatar for Skeen
0
2K
Member Avatar for kochan
Member Avatar for jbennet
0
47
Member Avatar for EastJohn

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 …

Member Avatar for Skeen
0
139
Member Avatar for AdRock

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 …

Member Avatar for AdRock
0
227
Member Avatar for don0369

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 …

Member Avatar for potatosoftware
0
128
Member Avatar for adam20091

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

Member Avatar for zohal
-1
105
Member Avatar for jv44heinzbar

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, …

Member Avatar for Skeen
0
357
Member Avatar for jlouang

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. …

Member Avatar for IT seeker
0
173
Member Avatar for madankumar

[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 …

Member Avatar for gurucode
0
933
Member Avatar for IT seeker

[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 …

Member Avatar for IT seeker
-2
477
Member Avatar for Grim279

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.

Member Avatar for Grim279
0
95
Member Avatar for Coodle

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, …

Member Avatar for abhi_elementx
0
143
Member Avatar for riderrocker

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 …

0
90
Member Avatar for dalcocer

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 = …

Member Avatar for abhi_elementx
0
101
Member Avatar for Nika01
Member Avatar for rookanga

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 …

Member Avatar for restrictment
0
118
Member Avatar for rino699

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 …

Member Avatar for jbennet
0
72

The End.