49,761 Topics
| |
hi, Im trying to have a function that would return a pointer and i cant seem to figure out what it is that the compiler complaining about. I got the following error: 80 expected constructor, destructor, or type conversion before '*' token 80 expected `;' before '*' token heres an … | |
I have an assignment where I need to input a certain value, and the computer will then run through an 'txt' file to see if the value is in there, otherwise it will ask you if you want to create a new value or make a new input. [code] ifstream … | |
Hello, I've written a knight's tour program and handed in a working version of it already using a bunch of if statements for each possible move. I really wanted to use a couple of arrays for the moves and consolidate my code more, but I ran out of time. I … | |
Hello, I am new to c++ and attempting the for command. This is my code #include<iostream> #include<string> int main() { for (int x=1; x<=10; x++) { cout <<"Hello"; } } but the error : undeclared identifier comes up for cout. I have tried other commands such as cin but none … | |
I reached another part of my program where I have the following statement which prints out these values on screen. printf(" %d %d %d %d %d %d %d(%.1foC) %d %d(%s) %d(%.2f) %d(%s) %d\n", year, month, day, hour, minutes, evtStart, temperature, tempDegC, checksum, basicSelfTest, bstResult, batteryVolt, (float)(batteryVolt*0.0198), powerUpCode, statusCode, timeElapsed); I … | |
hi plz hlp me in make this c language prog. 123 132 213 231 321 312 | |
I need to make a program that reads the program its self and echo prints it to the screen. I appreciate any help. For example if the program was: [CODE] <iostream> using namespace std; int main (){ //This is my program } return 0; [/CODE] My output would be this … | |
Hi, I am new to stacks and need some help getting started with my first program in stacks. I have all the functions like pop,push etc. in my header file. I have to create a palindrome program with the objectives below. If someone can give me an idea on how … | |
How to prompt user enter 10 integer then sort it in both ascending and descending order and also ask user either they want to sort it by insertion sort or selection sort or bubble sort?? | |
Hey guys, Can anyone post sample code about updating an object that is already in an std::list? I know that it sounds as a really stupid question, but obviously I'm doing something wrong. In my code I'm going through the list with an iterator until I reach the object of … | |
This is just part of my code. For some unknown reason, the value of staff is correct after using copy constructor, however, once it goes out of the loop, 2 of s value's turn into -858993460, other values stay fine, look at the red lines part of the code [CODE] … | |
so im trying to practice writing a few programs that might have to do with my upcoming test soon. in this program i wanted the user to enter a test score and it couts the letter grade. doesnt work properly it couts the test score instead of the letter grade. … | |
I started a new thread since my last thread was getting to long. I am using stacks to find out if a string of characters is a palindrome, is not a palindrome, and is almost a palindrome. However, my output comes up and then disappears when i compile. So far, … | |
#include<iostream.h> using namespace std; char*ones(int number){ int num = number&&100; if(num>10&&num<20){ return ""; } else { num = num%10; switch (num){ case 1: return "one"; case 2: return "two"; case 3: return "three"; case 4: return "four"; case 5: return "five"; case 6: return "six"; case 7: return "seven"; case … | |
write a function that determine whether a number is prime. | |
I need some help with a problem. I am attempting to insert numbers into a binary tree, then converted it to a rbtree, just curious on how i can change it over i know that 10 (black), 4(red), 5(black), 6(red), 11(red), 12(black), 13(red) as my input. int a[] ={10, 4, … | |
Hello , I have just started dealing with OpenCV and tried to open an sample.I am using version b4a. And when i opened a sample source file(for example:face detect). I compile source file(face detect) and it(visual stdio 6.0) gives 0 error or warning. But when i tried to run it … | |
I have the following integral function with Simpson's rule: [CODE] typedef double real; typedef real real_func(real); real Integral(real_func func, real a, real b, unsigned int N = 1000) {...} [/CODE] It works like: [CODE] real myfunc(real x) { ... } Integral(sin,1,2); Integral(myfunc,1,2); [/CODE] But does not work with a public … | |
I am not able to find a good MFC Tutorial. Do anyone has got a link for a MFC Tutorial which consists from basic to advance. | |
Hi, I would like to learn C++ and become a gaming programmer. Your suggestions to the following are appreciated. Q1) What development software do you suggest (compiler, code editor, ide, etc)? Free versions as well as priced, thanks. Q2) Regarding OS, does anyone recommend Linux over Windows (XP, Vista, 7)? … | |
can anyone answer this question? You are to write a C++ language program that: 1. Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text … | |
| |
Hey, I have to create class diagrams for each of class that I have created. I have currently create 4.. Please could you have a look at the example class diagram and tell me if it looks alright or have I done it completely wrong? Thanks for any help. | |
Hi. :-/ I am trying to create multiple output files while reading a single input file. The multiple files will be created based on the value in the first field. My set1 contains 1,2,3,2,1,3. That is Field1 values. My multimap contains the other fields (field2 and field3). Now what I … | |
I have a function which acts on class member function: [CODE] template <typename ClassType> double Integral(ClassType& obj, double (ClassType::*func)(double), double lower_limit, double upper_limit) {...} [/CODE] This can be call like this from outsie: [CODE] class myclass{ public: double classfunction(double); }; double myclass::classfunction(double x) {...} int main() { myclass probe; std::cout … | |
Hi, from my understanding, if you initialize an object without the "new", it will be only saved in the stack. If the method exits, the object is destroyed. Is that correct? What about this code? [CODE] int main() { string xxx = getText(); cout << "from main() " << xxx … | |
Hi all, I am a beginner to coding. Forgive me if my question is too silly. What I would like to know is can dynamic allocation in a loop result in shortage of memory. what I am trying to do is find FFT of a large no of images in … | |
The idea is to have many MessageBox() calls, each within their own thread. The catch is, each thread has to be dynamically created. At first, being a noob, I tried this: [CODE]void Go[10](void) { MessageBox(NULL, _T("..."), _T("..."), MB_OK); } .......... CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Go[i], NULL, NULL, NULL); [/CODE] That, obviously, didn't … | |
Hi, I'm fairly new to C++. My project states that I must write a program that will allow the user to view a list of TV shows read from an input file. each show should consist of four data members: show ID, Title, day of show, and time(pm). ID serves … | |
hi everyone i'm new in programing, so don't judge me if i will say something stupid... i'm trying to write i poker game in C++ but have faced with several problems, the first one is how to determine a winner... for example i player hand is: Ace of spades card … |
The End.