49,761 Topics

Member Avatar for
Member Avatar for Al Borland

Hi all just wanted to take a moment to introduce myself. I stumbled upon these forums while looking up more information on programming in C++. It looked very useful and it would be nice to have a forum I can ask questions on and post problems I"m having with coding. …

Member Avatar for PrimePackster
0
187
Member Avatar for stereomatching

I am trying to write some simple programs related to network and I boost::asio as a tool to start with Below is one of the example from a blog(I alter it a little bit) [code] void OnConnect(const boost::system::error_code & ec) {} void asio_7b() { asio::io_service io_service; asio::ip::tcp::socket sock(std::ref(io_service) ); try …

Member Avatar for stereomatching
0
156
Member Avatar for rohan121212

Hey everyone out there please help me with this code [code] #include<iostream> #include<stdlib.h> #include<time.h> using namespace std; int main() { long n; cout<<"Enter no. of random numbers to be generated\n"; cin>>n; int arr1[n]; srand(time(NULL)); for(int i=0;i<n;i++) { arr1[i]=rand(); } int x=0; int pos=0; double k=time(NULL); for(int i=0;i<n-1;i++) { x=arr1[i]; for(int …

Member Avatar for LRRR
0
139
Member Avatar for sathya88

i need some help..for vc++ 6.0 like vb inputbox...is there any inputbox available for dialog or sdi based mfc application... in vc++ is there any page navigation is possible... like vb hide or invisible...

0
56
Member Avatar for sathya88

am want to develop a file transfer program in vc++.. normal text file it is possible.. but is it can read for multimedia file.... like java here byte read is possible...

Member Avatar for sathya88
0
148
Member Avatar for cangan

Hii, I had an application which suffers from crazy scrollbars. When textboxes are loaded with some array elements their scrollbars scrolls towards to the bottom of the boxxes.So the multiline textboxes looks as if they are empty !!! However, when i open an empty project to see if this situation …

0
111
Member Avatar for dedmon

I kind of lost here... I have the book but it does not show the loop... I want to use je 100 but this is not the same language Using the IAS computer instruction set to write a program for the following C(I)=A(I) + B(I) for I = 1,2,... 100 …

0
87
Member Avatar for lmytilin

I'm a little lost with C++ so I could really use your help with this one! I googled it but nothing does what I want to do! So here is my problem... Let's say I have a file like this: A 10 20 30 40 B 25 13 100 99 …

Member Avatar for Lerner
0
177
Member Avatar for bobanderson93

every time i run the program it prints out 0. I think something is wrong with my display function but i cant see the problem. [CODE]#include <iostream> using namespace std; #define STACKSIZE 10 class stack { private: int arr[STACKSIZE+1]; int tos; public: stack(); void push(int x); int pop(); bool is_empty(); …

Member Avatar for richieking
0
134
Member Avatar for jonnyboy12

Hello all. I am trying to figure our how to add a pin and unpin button on one of my ms visual forms. An example of this is the pin that in used on the top right of the solution explorer in ms visual. I know that in the basic …

0
59
Member Avatar for Smartflight

We have been assigned to make a program for a bank using data file handling, as our project. I am having some trouble at this point... the last object written in the file is printed twice and I've no clue as to why. Case for display: [CODE]file.open("Records.dat", ios::in | ios::binary); …

Member Avatar for WaltP
0
555
Member Avatar for triumphost

Sorry for using Inception in the title but it's the only way I think I can describe it.. Take this for example: Definition.H [CODE] struct XY { string info; string name; string tag; string attrib; }; //is it better to create an object here inorder to make the array? struct …

Member Avatar for triumphost
0
140
Member Avatar for vyrte

hello everyone! i'd like to know if theres a way to run my program until the user presses Esc button. i use linux environment and my main function runs fork().i want the program to stop the fork() when the user presses escape. thank you!

Member Avatar for WaltP
0
175
Member Avatar for jigglymig

I am trying to make a circular linked list and I think I am not linking it properly in the middle area because I can print the last and first node, but not the rest... [CODE]#include <iostream> #include <new> using namespace std; struct node { int Item; node* Next; }; …

Member Avatar for Lerner
0
105
Member Avatar for PainOfTruth

Please help me run this program, i forgot the output of this.. [CODE] #include<iostream> #include<cmath> using namespace std; class SumTwoNumbers { int nx,ny,sum,suma,sumtn; public: int GetFirstNumber(); int GetSecondNumber(); int GetSum(int,int); void Display(int,int); }stn; int SumTwoNumbers::GetFirstNumber() sum=nx+ny; //here is where the errors i wrote below points! i dont know why return(sum); …

Member Avatar for sharathg.satya
0
413
Member Avatar for Ayzu

I'm trying to implement priority queue using a singly linked list, but the program is not running in the best way, n the display function is showing just first n last node's data , y??? [CODE]#include<iostream.h> #include<conio.h> struct node { int n,p,b; // Data members for getting Task no. ,Priority …

Member Avatar for Ayzu
0
242
Member Avatar for venky019

Hi, I got this error while trying to access the method that I've posted here. Main program: cin>>sname; string x; Sports x = Sports.getName();//error:a nonstatic member reference must be relative to a specific object. loc=x.find(sname); In Sports.cpp: string Sports::getName() {return name;} I've declared getName() function as public.Still I'm getting this …

Member Avatar for Ancient Dragon
0
3K
Member Avatar for ichigo_cool

Hey everyone, I've made a game with SDL and I'm now trying to distribute it. I've included all of the required .DLLs and such but now I get this error whenever I try to run the .exe: The application or DLL E:\GAME\DEBUG\MSVCR100.dll is not a valid Windows image. please check …

Member Avatar for Tumlee
0
457
Member Avatar for jdm

I'm writing a dayType class program and I'm having trouble with comparing two different days to each other. Here is what I have for them: bool dayType::equalDay(const dayType& otherday) const { } and here is main: if (day.equalDay(newday)) cout << " equal days" << endl; else cout << "not equal …

Member Avatar for jdm
0
95
Member Avatar for LucyButterfly22

Hey guys, I'm fairly new to C++ and I was wondering if I could get a hand with something. I'm trying to write a program that will create something called an anti-saccade task, in which the subject of the experiment would have to look away from the stimulus, for my …

Member Avatar for DeanMSands3
0
105
Member Avatar for sync101

Hi there, I am new to C++, and was wondering if someone could write an example program for me to work with. What I would like to do is take input from stdin and then display the translate output to stdout. Example: Input: [code] (color 0 0 0.1) // These …

Member Avatar for jaskij
0
104
Member Avatar for stereomatching

[code] struct String { String() { std::cout<<"String::String(), this="<<this<<std::endl; } ~String() { std::cout<<"String::~String(), this="<<this<<std::endl; } String(String const &other) { std::cout<<"String::String(String const &other), this="<<this; std::cout<<", other="<<&other<<std::endl; } String& operator=(String const &other) { std::cout<<"String::operator=(String const &other), this="<<this; std::cout<<", other="<<&other<<std::endl; return *this; } }; String const operator*(String const &lhs, String const &rhs) { String …

Member Avatar for stereomatching
0
174
Member Avatar for CrewAlien
Member Avatar for Smartflight
0
288
Member Avatar for Lensva

Code works, however i'm having problems with reverse string- i cant figure out how to index the elements. for cycle returns errors, what else could i use? The end goal would be to compare string line with string reverse. If adequate elements match its a palindrome. [code=c++] #include <iostream> #include …

Member Avatar for rohitvipin
0
2K
Member Avatar for cl2020

I have a palindrome set up in the system, and running fine. However, when I type "never odd or even" or "A Man, A Plan, A Canal, Panama", it didn't run properly as if these words in quotation marks are considered palindromes. Where is the loophole on my code re: …

Member Avatar for youjean
0
335
Member Avatar for adesh.soni

I have a problem to test endiness of c++ code . It contain around 170 files. How to check that whole code is bi-endian ?

0
43
Member Avatar for sharathg.satya

I saw this example while i am searching about vectors.. [CODE] vector<double> student_marks; // no size specified: vector contains // no elements int num_students; cout << "Number of students: " << flush; cin >> num_students; student_marks.resize (num_students); for (vector<double>::size_type i = 0; i < num_students; i++) { cout << "Enter …

Member Avatar for sharathg.satya
0
115
Member Avatar for jonnyboy12

Hello all. I have a question with no code because i'm a beginner at mfc and find it very confusing. I can see that there is a message loop in mfc. From what i understand it is like an event in windows form applications. In my mfc application i want …

Member Avatar for Ancient Dragon
0
182
Member Avatar for triumphost

The below code is what I have.. It's a custom type I made called Points that stores co-ordinates on the screen.. The problem is in the PointsArray Struct. When I declare one like so: [CODE] PointArray P; Point A(10, 5); for (int I = 0; I < 5; I++) { …

Member Avatar for triumphost
0
248
Member Avatar for SaimaAsif

Please help me its urgent... I have a MSDN Queue class, I need your suggestion can I make a message class and enqueue its objects as an element. [CODE]// new.cpp : main project file. #include "stdafx.h" #include "message.h" using namespace System; using namespace System::Collections; void PrintValues( IEnumerable^ myCollection ); void …

Member Avatar for SaimaAsif
0
231

The End.