49,757 Topics
| |
Hi, I'm a newbie to C++ so please be patient. I have to create program that outputs a simple moire pattern or a graph of y-values from a .csv file depending on which one is called. The code below is what I have before main and is where I am … | |
I got run-time error for the following code. I am just starting to get familiar with linked list. Can any one point out what's the problem here? thanks [CODE] #include "stdafx.h" #include<iostream> using namespace std; struct node { int data; node * next; }; node* buildonetwothree() { node* head=NULL; node* … | |
Hi there! I need help with my assignment. The point if it is to make an array table that will hold various linked lists that hold other items. I already have my code to add and retrieve information from a linked list. I need help making an array that will … | |
Hi, I am kind of new to C++ and really stuck with a problem. Here I am trying to parse a string and after comparing to a pre-declared array save the tokens in a vector of vectors. It is giving a number of errors and I'm not sure what to … | |
hello i am having a little problem, I cant convert a double to one decimal place: here is my code [code=c]for(int i=0; i<marklist.size();i++) { double result=floor((marklist.at(i) /maxmark)); cout<< result<<endl; } [/code] I want result to be one decimal place | |
Hello, I am supposed to write a statement for a Codelab review test that asks: [I]"Given that two int variables, total and amount, have been declared, write a loop that reads integers into amount and adds all the non-negative values into total. The loop terminates when a value less than … | |
I am writing a model economy in which corporations (class BCorp) and persons (class BPrsn) act as agents buying and selling goods and services. I have a pool of contacts (class BContact) in which contact information is retained about each contact between agents. In a contact object I store a … | |
plz help me 2 finish my c++ proj on supermarket.i need the exact details of the funcns,sub calculatns............. urgent | |
I was trying to make a for loop count down backwards using this loop, but when it gets to zero, instead of realizing that decrementing will bring the number below zero, it tries to make the unsigned short (-1), which is actually 65535 as unsigned. of course, this code produces … | |
One of my assignments is to write a factorial function. I have no clue how to start this program. HELP!! This is my assignment.. Example Outputs Enter the number: 5 The factorial of 5 is 120 Enter the number: 0 The factorial of 0 is 1 Enter the number: -8 … | |
I have a problem, I want to create a program in C++. A simple program displaying all even number between 1 and 100, (such as 2, 4, 6, 8 etc.) in an out put. Can you tell me what wrong. Something like this. #include <iostream.h> int main() { int num1=1; … | |
Hi all!!! Could any one help me??? I want to build curve with C++ 6.0, but I don't know how to begin. I've been learned more about this case and the general problem is about header file "graphics.h". It is right?? Please help me!!! thanks a lot.... | |
I have a text file that I am reading into my program. The data looks as follows: Last Name, First Name, Current Salary, Raise Percentage iller Andrew 65789.87 5 Green Sheila 75892.56 6 Sethi Amit 74900.50 6.1 Ge Robert 81990.23 3.3 Smith David 43221.33 5.5 Jones Mary 33345.12 2.3 Goodman … | |
I'm supposed to write a program in C++ to show someone a grade criteria. I need some major help with it! I'm so so so confused! :( here is my assignment. please help me! A >= 90 B >= 80 C >= 70 D >= 60 F < 60 The … | |
can we make the maze game using header files of conio.h and iostream.h | |
Firstly i know your gonna say "OMG this guy just want to make his homework using our help" "Wow, this guy is so stupid not knowing this" Yes, i dont know this.. and yes this is my homework.. i'm not asking a direct answer atleast just teach me while pointing … | |
Here I have another one: The program that should first read in two values from the keyboard, a starting value and an ending value. It should sum all the even numbers between those two values including the endpoints and display the sum. If the ending point is less than the … | |
a 'challenge' question by my teacher asks me to look in my C++ book, and do a question. it asks me to: write a function powfun() and make it raise an integer number passed to it to a positive integer power and returns the result to the calling function. it … | |
Hello again everyone, How are you all doing? I am an fairly familiar with C/C++. I have five books on my shelf about programming in C/C++ but none could provide me with a satisfactory solution to this one problem. I would like to graduate from the Hello World project in … | |
| I just finished writing a string class that includes functions for generating random string (why I don't know, as I have never really needed random strings before). Basically the user can pass the function an enum citing what kind of string that'd like (i.e. AllUpperCase or AllNumeric). There is also … |
I trying to read in from a file but getting runtime errors can some one help find the .txt file as an attachment [CODE]#include<iostream> #include<set> #include<stack> #include<queue> #include<algorithm> #include<fstream> using namespace std; int main() { const int size= 7; char input[size]; fstream nameFile; nameFile.open("words.txt"); if(!nameFile) { cout<<"error cannot open file"<<endl; … | |
Hello, So I am just starting to really use Make files in Linux, and I am getting the following error when I try to "make": c++ -c main.cxx In file included from main.cxx:2: LinkedList.h:39:26: error: LinkedList.cxx: No such file or directory make: *** [main.o] Error 1 Here is my make … | |
Hello all, I dont know if this is the right area but anyway Heres my situation: I have a software that updates 2 devices firmware's, the software communicates with the devices via Serial Cable(RS-232) , my problem is: I only have 1 serial(COM) port in my motherboard, and i need … | |
Hey guys, I am making a calculator. It has two "screens", one showing input and one showing output. When the equals button is pressed on the calculator, the calculation is shown on the output screen. I have come across this problem: Let's say I type into the input screen "10" … | |
Hi every body I want to write a program that get a char value and put it in the pointer array until the user reach to end of line. what is the problem with my code. my code: #include <iostream> using namespace std; int main(){ char str ; int lenght=1 … | |
I got run-time error in the following simple code, but I don't know what's the problem. can any one help? [CODE] #include "stdafx.h" #include<iostream> using namespace std; void reverse (char * source) { int i=0, j=strlen(source)-1; while (i<j) {char temp=source[j]; source[j]=source[i]; source[i]=temp; i++; j--; } cout<<source<<endl; } void main() { … | |
Hello I am reather new in c++ and I try to solve some exercises but i got blocked. Can anyone help me with this? The program should read in values until a negative value is read in. It should determine the largest value that was read in and display that … | |
Hello everyone, I have a problem, I have to get value from edit box, store it in variable and based on that value need to update another edit box. Please tell me how can i get inter value, which is entered by user in visual c++. | |
#include<iostream> using namespace std; int main() { int x,inpt,ctrl; x=1; ctrl=1; cout<<"Enter a number: "; cin>>inpt; while(ctrl<=inpt) { while(x<=ctrl) { cout<<x<<" "; x++; } cout<<"\n"; ctrl++; x=1; } system("pause"); } can u please help me to invert this triangle? | |
Hello. I'm writing codeing progam. It reads from file using fstream and then converts simbols to ascii, changes ascii, converts ascii to symbols and writes them to file. I tried to code .txt file with it. It worked perfect. But then i tried to convert .bmp file and then i … |
The End.