49,761 Topics

Member Avatar for
Member Avatar for fire_

Hi. How can i make Dialog box visible only in one application window for examlpe only on firefox? I'm using MFC. Thank you

Member Avatar for fire_
0
93
Member Avatar for ielo

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

Member Avatar for ielo
0
95
Member Avatar for andimiami

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 …

Member Avatar for Ancient Dragon
0
724
Member Avatar for raider650

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

Member Avatar for stevanity
0
108
Member Avatar for Borzoi

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 …

Member Avatar for stevanity
0
109
Member Avatar for Kunal Aggarwal

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

Member Avatar for Kunal Aggarwal
0
195
Member Avatar for Nathaniel10

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

Member Avatar for Nathaniel10
0
73
Member Avatar for clarencehwang

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 …

Member Avatar for kvprajapati
0
184
Member Avatar for tln26

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

Member Avatar for hits86
0
376
Member Avatar for ktsangop

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 …

Member Avatar for ktsangop
0
161
Member Avatar for burcin erek

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 …

Member Avatar for burcin erek
0
143
Member Avatar for The physicist

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 …

Member Avatar for jonsca
0
189
Member Avatar for LloYdZ

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 …

Member Avatar for EarendurRingern
0
153
Member Avatar for theausum
Member Avatar for theausum
0
116
Member Avatar for dspjm

I want to read some books about data structure written in c++, can anybody recommend some good books for me?Thx.

Member Avatar for dspjm
0
119
Member Avatar for Ptap03

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 …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for aaronmk2

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 …

Member Avatar for mrnutty
0
214
Member Avatar for tdnghia89

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 …

0
74
Member Avatar for centerline00

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 …

Member Avatar for gerard4143
0
128
Member Avatar for UZU309

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 …

0
64
Member Avatar for watery87

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

Member Avatar for Unimportant
0
188
Member Avatar for Anuradha Mandal
Member Avatar for daviddoria
0
234
Member Avatar for Nathaniel10

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

Member Avatar for Nathaniel10
0
84
Member Avatar for bonucci

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 …

Member Avatar for Unimportant
0
101
Member Avatar for athar89

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 …

Member Avatar for mrnutty
0
440
Member Avatar for Urv73

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 …

Member Avatar for Unimportant
0
74
Member Avatar for usshadowop

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 …

Member Avatar for Unimportant
0
143
Member Avatar for kra9853

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 …

Member Avatar for Unimportant
0
237
Member Avatar for kra9853

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?

Member Avatar for jonsca
0
77
Member Avatar for ginn69

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 …

Member Avatar for jonsca
0
71

The End.