49,761 Topics
| |
my code convert from decimal to octal here is but say input 26 ,output 23 i want output =32 what can i do? [code] void main() { int value; cin>>value; //value=26 int rem=0; while(value!=0) { rem=value%8; if(rem%8!=0) { value--; } i++; value=value/8; cout<<rem; //output 23 [/code] | |
[B]I want a certain library to read picture in different format especially bmp format and store it in matrix like command in MATLAB [/B] [code] imread () that take the file name and it is extension [/code] [B]thank you in advance[/B] | |
I have Write a c++ program to allow the user to divide an array of 100 different random numbers between 3&90 into two arrays, one for the odd numbers and one for the even numbers. Then for each of the new arrays, find the average of those numbers. Use a … | |
can anyone tell from where i can download the latest bloodshed dev C++ IDE... my problem is i am not able to access the [url]www.bloodshed.net[/url]... :( so is there any other link to download it?? | |
This is my program of stacks. The problem is this that it does not show output. whenever I run the program, the output screen flashes and nothing else happens. (using Dev-C++) Don't know what's the problem with it. [CODE] //****************************STACKS******************************** //===============Stacks using linked list(Arrays)================= #include<iostream> using namespace std; int avail=-1, … | |
Everytime i run my program after i enter my first value for the number of students, i get the windows box that pops up and says studens.exe has encountered a problem and needs to close. Is this a problem with my cose of a computer problem? thanks [code] #include <iostream> … | |
i have this constructor to display a bitmap and it displays with 1's and 0's..i jus need 2 know how 2 make the 0's into *'s...i think its an if statement but i dont know exactly were void bitmap::display() const { for (int r = 0; r < numrows; r++) … | |
Hey guys, I am working on some software and I have ran into an issue which I cannot seem to get past. This is probably easy for most of you, but I am rather new to c++ and could use some help. Basically what I need to do is read … | |
Hi, I need help with a Golf Stats Program I am trying to complete. It is a dat file. My averaging functions are not working. Can someone suggest what I can do to correct the problems with both averaging functions? main [code=cplusplus] #include <iostream> using std::cerr; using std::cout; using std::cin; … | |
Hey guys, I have been working on this program for my entire semester. I got it down to do what I want I think... except when I compile it, I get no errors or warnings (using Dev) and when I execute it runs through half of it and it stops … | |
What i am trying to to is the following when user inputs ./test U [url]www.google.com[/url] I <ip here> same for ./test U <URL here> I <IP here> using command line input argv and argc here is what i have done so far, [code=cplusplus] #include <iostream> #include <cstdlib> #include <string> using … | |
Hi all,I have some intermediate knowledge on c++ but I have a few questions about windows programming. [CODE]int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, INT nCmdShow) {.... } [/CODE] now here I don't understand the word "WINAPI" in c++ I have never seen such tning.. what does it mean? … | |
the program keeps track of a persons musical library. addsong checks to make sure that the data being entered is not already present in the file. if it is present, it is not added, if it isn't present, it is added at the end of the file. the removesong function … | |
the "addsong" function working, i just dont know how to tell the compiler to [B]skip over[/B] elements in the vectors with empty strings, when writing the new data to the music_library file. this is because i have to write a remove song function where, after the song is removed, the … | |
so this function is working correctly (as far as i know) but the only thing that i haven't quite figured out yet is how to send the new input, and completely overwrite the existing "in_stream" file. this program opens a file (containing song titles, artists, and their genres) when the … | |
Can anyone please help on how to create log file in Visual C++ using MFC???? | |
hey Iwant to convert from interger to character char num[1000]; num[i]=rem; strrev(num); what is wrorng whith this form?? warning : warning C4996: 'strrev' was declared deprecated I can't understand this warning Hope Help me | |
ok short and sweet hopefully. suppose you have a struct like so [CODE] struct SomeName { string id; } [/CODE] and you read data from a file into the id then you want to search for a specific id that has a relationship to a name [CODE] long findStudent (StudentList … | |
hey friends i am in dilemma of which compiler to use.. i have been working on windows OS. also the C++ concepts that we are taught in our college are practically taught on Borland Turbo C++ compiler (dunno how aged it it :P) :( i mean we people write the … | |
i have a text file <start>welcome!30 is my class roll number<end><start>A is the first alphabet<start>12345678919<start>c++ is a good language and <start> and <end> are strings. I have to create a c++ function that will delete only those text ocurring between <start>and<end>,including <start> and <end>.Text that starts with <start> and does … | |
[COLOR="Red"]Today I have some question and their solution ,but I have problem with some.[/COLOR] [COLOR="red"][COLOR="Green"]Q1: Write a program that checks if a sequence of positive numbers is in increasing order or not.[/COLOR][/COLOR] [COLOR="Red"]I don't know what is missing her?![/COLOR] Solution: [CODE]#include<iostream> using namespace std; int main(){ int value,check=1; cout<<"Enter a … | |
Hi everyone, I am pretty new to C++ Programming... but am currently working on a project where I need to try and get an old fortrans program working again... I have the executable which can start up and run through initialization, but once I try to run the simulation it … | |
The task which i have to do is search according to name, dob, and sex. The user will input a criteria and it will show out everything that is stored inside the .dat file. Plus i need to create new .idx categorizing the criteria. Please help me on this. Thank … | |
How do I prevent the user from entering characters when a float is required? I'm using a bool for valid entry so if they enter text it sends my loop running | |
Can anyone please help me to find the sum in the linked list. I have written codes to insert and remove numbers from lists but I have no idea how to calculate the sum. [CODE]void List::insert( const double &value ) { ListNode *newPtr = getNewNode( value ); if ( isEmpty() … | |
I want to create program for client-server. Where server run continuously..... when client starts...server send one exe to c drive on client machine..... execute the exe...and return result to server... For multiple client ... How to do this ?? Plz give me hint or any sample code??? | |
Hello everyone; I've got a project at hand that I must pass and I have to admit, I am not good at c++. No excuse, though. I've got all day to get this thing done. Its a project that asks me to; [I]1. Input 2 matrices from 2 files!!!!! | |
is this a good example to demonstrate the different types of inheritance? kindly give feed back and suggestions.. ps:using the g++ compiler [code=c++] #include<iostream> using namespace std; class life{ public: virtual void eats()=0; protected: char* predator; char* prey; }; class producers : public life{ virtual void eats()=0; }; class animal … | |
I have this data, but when i sort it different from what i want. I want to sort in descending order like this 2 30 1 20 3 15 [U][B]jest.txt[/B][/U] 1 20 2 30 3 15 [U][B]after compile[/B][/U] 1 15 30 15 15 15 [code=C++] #include <fstream> #include <string> #include … |
The End.