49,757 Topics

Member Avatar for
Member Avatar for arjen

print a list of integers from 1 to N that are both divisible by 2 and 3.and after producing the list, count the numbers of integers found.

Member Avatar for LevyDee
0
280
Member Avatar for ToiNKieZ

can somebody teach me or show me a code that converts a binary to a decimal.... >_< and if you could kindly explain how it happens.... should be in TurboC programming....

Member Avatar for stereomatching
0
144
Member Avatar for rtdunlap

I need to write a C++ code that will ask the user to enter either 1 or 2. If 1 is entered the program must count all even numbers from 0 to 100. (I got that part done) If 2 is entered you are suppose to prompt the user to …

Member Avatar for stereomatching
0
104
Member Avatar for burcin erek

5 student picked up 5 balls. they do not choose same number but during print out process, the program is writing different ball number i dont know why? [CODE]#include <cstdlib> #include <iostream> #include <conio.h> using namespace std; int main(int argc, char *argv[]) { int i; int ogr[5] = {0}; // …

Member Avatar for burcin erek
0
101
Member Avatar for keeda

Hi, I have to pass a void pointer in a function and at the other end I have to read some values from this void pointer. I planned of creating a class and setting up required variables into an object and then I set this [CODE] void* ptr = obj …

Member Avatar for keeda
0
97
Member Avatar for kuchick32

I have an assignment where I'm taking a file from my computer and using the numbers to pull something out. I'm supposed to take numbers from a file and checking to see how many times the number is in the file. But i can't seem to figure it out. This …

0
85
Member Avatar for cortez716

This function should take as it's arguments two integer values. The function should return the smaller of the two values. From main ask the user for two integer values. Pass the two values to your smallest function, then print out the returned value. I am new to c++ and struggling …

Member Avatar for cortez716
0
151
Member Avatar for Duece_68

Hi I was just wondering if I create a pointer using the new operator and then I call the new operator on that same pointer later on would that overwrite the existing pointer so that I do not waste memory on the heap or do I have to delete it …

Member Avatar for Duece_68
0
129
Member Avatar for jmcorpse

I wrote this program about four hours ago and everything but my if loop is working. I wrote a separate one in a test file and it works, for the life of me I can't get it to work in this program. When inputting anything other than a y or …

Member Avatar for jmcorpse
0
124
Member Avatar for pwp14

Create a logical function IsConsonant(ch), which returns true if ch is a consonant. The characters considered vowels are: 'a', 'e', 'i', 'o', and 'u'. Your function can assume ch will be either an upper- or lower-case letter. I have no clue what i am supposed to do. Can i get …

Member Avatar for kes166
0
92
Member Avatar for smeghead007

ok guys I need your help. What i need to do is create a program that prints out a user specified pattern. the user specifies the size and which pattern. the patterns should llok like this Patter 1 Pattern 2 Pattern 3 Pattern 4 5$$$$ $$$$5 $$$$$ $$$$$ $5$$$ $$$5$ …

Member Avatar for smeghead007
0
153
Member Avatar for Rayanjaha

Q: find the area of the rectangle using 2 objects This is my code with out the 2 objects normal code [CODE] #include<iostream> using namespace std; class rectangle { int q,w ; public : void set_value (int e, int r) { q=e; w=r; } int area() { return q*w ; …

Member Avatar for mrnutty
0
115
Member Avatar for daviddoria

I just learned about heaps today. It looks like STL wants you to create a heap by first creating a vector, then using make_heap from <algorithm>: [code] std::vector<SimpleClass> Numbers(8); // ... populate ... // convert Numbers into a heap make_heap(Numbers.begin(), Numbers.end()) ; [/code] Why is there not a <heap> just …

Member Avatar for Narue
0
102
Member Avatar for vbx_wx

Why am I getting this errors when running this program where i tried to create 2 specialized templates to use int and double: [code] #include <iostream> using namespace std; template<> int sum<int>(int* array, int start, int stop, int init = int()) { int* stp = (array + stop); int* str …

Member Avatar for sandy#123
0
448
Member Avatar for MrJNV

I have a question: Say I have a text file with a bunch of words on it, say the following: hello baby crap hate ground soul fart hot render Now, if I make a program that requires the user to input a word, how would I go about searching the …

Member Avatar for hag++
0
253
Member Avatar for lepinat0r

Hello all, I am a long time browser and first time poster here. Right now I am a little stuck on my project and could use a little help. The program opens a .txt file and then reads the data and places the data accordingly. The issue this time compared …

Member Avatar for lepinat0r
0
120
Member Avatar for Jennifer84

Hello I have put a web browser control on the form. Now I use different URLs for this browser but sometimes popups and "Internet Explorer Script Error" windows popups appear. My question is how it would be possible to block popups for this instance below of webBrowser1 ? I am …

0
63
Member Avatar for tehmarto

So I have a file I wanna put its content in an array and that needs malloc or new. I do that on a large project, it was working fine but i guess some changes were made to this project and now that malloc causes a crash and "char* array …

Member Avatar for tehmarto
0
142
Member Avatar for codingNewB

Hello everybody, really need some help getting this code to add up even and odd numbers from a set of integers. But it also needs to default or continue through if input is incorrect (i.e.- $,@,#,3.4) and so on. Here is what I have so far. Thank you. [CODE]#include <iostream> …

Member Avatar for ironmancpp
0
2K
Member Avatar for Jennifer84

Hello, I wonder how it is possible to read a multilined textBox line by line into a List<String^>. I dont get the below code to compile so I might be missing something here ? [CODE]array<String^>^ mylines = textBox1->Text->Split(System::Environment::NewLine); List<String^>^ getLines = gcnew List<String^>(); String^ getLine = ""; for (int i …

Member Avatar for hag++
0
191
Member Avatar for sampk2002

Hi i am student of bs . I Join Late in uni I have some problem can u please help me out to make these programs

Member Avatar for frogboy77
-2
110
Member Avatar for kelvindata

hello can you make and run a program that will display the numbers 1,2,3, and so on depending on the number of lines the user will enter. example output: enter a number=3 1 23 456 thanks for the help..

Member Avatar for kes166
-2
205
Member Avatar for malvi

Hello, Can anyone please suggest me how to acquire the data from a RS 232 port continuously..i.e The port will be open and it should keep reading data till I say stop. without using timer. And data is coming in every half second in rs 232 Thanks in advance for …

0
66
Member Avatar for malvi

Hello, Is this function "EscapeCommFunction" is correct to set RTS signal? Here is my code. I want to set on RTS before sending data to rs232, and set off RTS after sending data. // RTS on. EscapeCommFunction(*hComDevice, SETRTS); // Sending data to port. fWriteStat = WriteFile(*hComDevice, txbuf,(DWORD) iTxPosition,&dwBytesWritten, NULL) ; …

Member Avatar for malvi
0
503
Member Avatar for exekiel101

[CODE]#include <iostream> using namespace std; int main () { int x; cin>>x>>"\t"; int A = A[x]; return 0; }[/CODE] the error is "subscript requires array or pointer type" how can i input my desired number of size by using cin for x??? help

Member Avatar for anantk
-1
104
Member Avatar for timb89

Im trying to insert items into a BST from a txt file. For arguments sake the data file is just the integers 1 2 3 4 5 6 7 8 9. When i try to do a inorder traversal, all that is outputting is the first and last number. I …

Member Avatar for timb89
0
171
Member Avatar for Garrett2011

Is there any way to inline just some selective calls to a particular function not all of them? by function I also mean class operators like assignment operator, constructors like copy constructor. The only form I know is declaring function as such at beginning and that's supposed to effect all …

Member Avatar for Narue
0
150
Member Avatar for ganesh_IT

Hi guys, I am writing project for bank operation in MFC, before running my application i have to check the username and password. But i have some problem in my code, my main frame window is closed after enter username and password.Any one tell me the reason..... [CODE] class CLoginDialog …

Member Avatar for mitrmkar
0
118
Member Avatar for tikoti

Hi all! I am trying to manage and understand dates with c++, but the output that I am having does not help much. Basically I would like to adjust a localtime that can be seen in the string "s_prueba_time" to a UTC time (in my case -2 hours in summer …

Member Avatar for tikoti
0
185
Member Avatar for frogboy77

Sorry if this is repetative but still struggling with this. i wish to multiply 2 long integers together. if the result is outside of int64 range i want the loop to break otherwise i want to keep the result and increment the second number. have tested this, but when the …

Member Avatar for frogboy77
0
116

The End.