49,761 Topics

Member Avatar for
Member Avatar for Lotus_2011

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]

Member Avatar for Narue
0
86
Member Avatar for farag

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

0
60
Member Avatar for elmoro

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 …

Member Avatar for Ancient Dragon
0
68
Member Avatar for bhoot_jb

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??

Member Avatar for bhoot_jb
0
153
Member Avatar for jmines

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

Member Avatar for jmines
0
118
Member Avatar for xtheendx

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

Member Avatar for Salem
0
69
Member Avatar for shotjase

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++) …

Member Avatar for shotjase
0
77
Member Avatar for still_learning

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 …

Member Avatar for Luckychap
0
100
Member Avatar for Moporho

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

Member Avatar for Ancient Dragon
0
163
Member Avatar for mofoparrot

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 …

Member Avatar for mofoparrot
0
152
Member Avatar for mussa187

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 …

Member Avatar for Ancient Dragon
0
113
Member Avatar for rumencho

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

Member Avatar for Duoas
0
120
Member Avatar for rem0404

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 …

Member Avatar for rem0404
0
77
Member Avatar for rem0404

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 …

Member Avatar for Ancient Dragon
0
112
Member Avatar for rem0404

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 …

Member Avatar for Necrolis
0
170
Member Avatar for cb02061
Member Avatar for Necrolis
0
3K
Member Avatar for Lotus_2011

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

Member Avatar for Colin Mac
0
139
Member Avatar for n8makar

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 …

Member Avatar for n8makar
0
97
Member Avatar for varshini
Member Avatar for bhoot_jb

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 …

Member Avatar for bhoot_jb
0
142
Member Avatar for replyfast

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 …

Member Avatar for Agni
0
75
Member Avatar for computer engW

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

Member Avatar for computer engW
0
103
Member Avatar for rkpalmer

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 …

Member Avatar for rkpalmer
0
134
Member Avatar for falassion

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 …

Member Avatar for ShawnCplus
0
35
Member Avatar for henpecked1

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

Member Avatar for henpecked1
0
139
Member Avatar for complexcodes

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() …

Member Avatar for Laiq Ahmed
0
3K
Member Avatar for Aamit

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???

Member Avatar for Ancient Dragon
0
86
Member Avatar for Kyouya

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!!!!!

Member Avatar for Agni
0
140
Member Avatar for rje7

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 …

Member Avatar for rje7
0
196
Member Avatar for nurulshidanoni

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 …

Member Avatar for nurulshidanoni
0
80

The End.