49,761 Topics
| |
Hi. How can i make Dialog box visible only in one application window for examlpe only on firefox? I'm using MFC. Thank you | |
[CODE][/CODE]I thought I knew how to use vector and manage insert, push_back and erase, but apparently I don't. I encounter an unexpected outcome when i attempt to erase the second element in a vector of four: the element is removed, yet the content of the element following it is modified. … | |
How do I write this C++ sentinel-controlled while loop? I need to write a sentinel-controlled while loop to see if the coefficients of a quadratic equation have real roots using a nested decision. A character q must be my sentinel. This is what I have so far, but it doesn't … | |
Everything runs fine, except the Lowest Temperature and HIghest Temperature do not output correctly. Also any suggestions on how I could implement vectors, Any help would be greatly appreciated. Thanks. [CODE] #include<iostream> using namespace std; int main() { int i(0); double Calc(double fahren); double Total(0),Celsius[5],Fahrenheit[5]; double CelciusLowTemp(0), FahrenheitLowTemp(0), CelciusHighTemp(0), FahrenheitHighTemp(0); … | |
I haven't done any C++ programming for quite a while now and the last compiler I used was Dev C++ (not sure which version/release but likely an old one). I want to start programming in C++ again but I'm an unaware of which free compiler would be the best to … | |
I am Creating a MFC Application to Read a Text file into a Edit Box. I am implementing the following code [CODE] FILE *m_pFile ; CString m_strLine , m_strText; char line [1000] = "" ; m_pFile = fopen ( "C:\\SELF.txt" , "r" ) ; if ( m_pFile != NULL ) … | |
I am trying to do an exercise in Stroustrup's book. The task is to create two arrays (with different values) and pointers to each array, and copy the first array to the second using the pointer and reference operators. My code is below. [code] #include "../../std_lib_facilities.h" int main () { … | |
How to I call a C++ function from my C# class with the following signature? [code=c] int MyFunc(MyStructure **) typedef struct MyStructure { unsigned char ID[16]; unsigned int* Path; AnotherStructure *Format; } typedef struct AnotherStructure { short Owner; short Type; } [/code] I attempted the following in C#... [code] public … | |
I am trying to get the numbers in the array to give me a average out put. here is what I have so for: [COLOR=#0000ff][/COLOR] [CODE] #include "stdafx.h" #include <iostream> #include <cctype> using std::cout; using std::cin; using std::endl; int main() { int grade[10]; int count = 0; char reply = … | |
Hi everyone. I have an MFC project in Visual C++ 6 and was wondering in which way can i detect the level of audio output. I want to execute some code only when no sound is sent to the audio output. Could anyone please give me a clue of how … | |
Pls check the code. for example during betting if you write "One" if the dice comes 1, you win. but when you write one it writes 2.28 1026 why. I dont want case sensitive and it would be perfect if the first and second character I write for input, it … | |
Hi all, I'm trying to convert a console application that I wrote in Codeblocks to a Windows Form application written in Visual Studio .NET 2003. I'm having trouble converting a piece of code that reads in a formatted text file line by line (the text in the file is always … | |
The registrar of your school needs a program that can be used to prepare grade reports for students at the end of each semester. For each student, the program should display a table showing each course taken during the semester and the grade and credits for that course. The program … | |
For Mobile Applications carbide C++ is better or j2me is better? | |
I want to read some books about data structure written in c++, can anybody recommend some good books for me?Thx. | |
Hello, First I would like to say thank you for looking and any help will be greatly appreciated. I am trying to write a code which does the following: 1) Read a file (The file contains list of words) 2) The purpose of the program to ask the user to … | |
I an trying to find the height in a binary search tree. I figured out how to count the leaves going directly left and directly right, but cannot figure out how to get he leaves in the middle. [CODE] int BST::height(){ int tall =0; int tall1=0; BinNodePtr ptr=myRoot; if (ptr->left … | |
Hi all, I have the following problem: My server sends the string str="1 2 4 dds \n" continuously to a C++ client.Here is the java code of the server: [CODE] private class SendingThread implements Runnable{ public Socket s; public DataOutputStream oo; public ObjectInputStream oi; ////private QueryTransferObject q; boolean connected; public … | |
Why is it, when I compile this, the cout statement runs twice at first? It does not do that when I have the rest of the code in there that is int. Any thoughts of why or what I am doing wrong.. #include <iostream> #include <string> using namespace std; int … | |
Hello all, I am trying to figure out how to make my program do the following(it's a table): The user enters a beginning amount and interest rate. The year, beginning amount, interest and end amount are all supposed to keep increasing until the end amount is doubled of the beginning … | |
Hi guys, this program is suppose to ask user input for up to 10 book titles and date published using classes. However im having trouble with a certain part of the output. My coding as follows [code] #include <iostream> #include <string> #include <sstream> using namespace std; class bookInput { private: … | |
how can I will make a student database using linked list in c++. | |
I am trying to do an exercise from Stroustup's book. The task is to create an array of 7 ints, assign its address to another variable, then print out the array value and the address. My code is below. [code] int main () { int p0[7] = {0, 0, 0, … | |
Hi guys, nice being a part of this community, sorry for my english if some sentences doesnt make much sense. Well, my question is i have a file, i liked to make a script that for example, in 1 or 2 hours would get the txt file where its located … | |
Hi guys, can anyone suggest an alternative method to splitting an integer into separate digits besides using the modulus"%" and division"/" technique or using itoa() or such functions to covert it to a string and then split it. i want to do it without the aid of STL or any … | |
Hi there!! I have a simple program (I'm a newbie) that inputs data for different people. For instance: [B][COLOR="Green"]Employee nr? 122 Nr of years in company? 2 Employee nr? 29 Nr of years in company? 5[/COLOR][/B] The thing I wanna ask is for a simple way to se a output … | |
Having trouble implementing my own reserve function. ( have to do it for an assignment) Here is what i have so far but it doesn't appear to work. .h prototype [code=c++] void reserve(size_type n);[/code] constructor for our string [code=c++] mystring::mystring(const char * s) { len = strlen(s); buf_size = len … | |
I need help rewriting my if-else statements into a switch statement, [CODE]//equations for final grade LGT=(LG1+LG2+LG3+LG4)/40.*.40*100; MTPG=MTP*.4; MTEG=(MTE/55.)*.20*100; sum=LGT+MTPG+MTEG; if(sum>95) //if-else statements, determines final grade letter='A'; else if(sum>85) letter='B'; else if(sum>75) letter='C'; else if(sum>65) letter='D'; else letter='F'; cout<<"final grade is: "<<letter<<endl;[/CODE] also i need to somehow get my switch statement … | |
How do use the pow function with variables? i.e. [CODE]//equations for problem 9 page 99 part b cT=(hT)/2; iT=(base*(hT*hT*hT))/12; LT=(sT*iT)/(8*cT);[/CODE] *math.h file in program how would i raise "hT" to the 3 power in correct c++ syntax? | |
write a program which prompts the user to enter an integer whose value is more than 3. Based on inputed number, the program outputs a rectanglar textual shape using digits.(see below). sample run enter n: 5 ***** * * * * * * ***** can explain detail like write down … |
The End.