49,761 Topics

Member Avatar for
Member Avatar for hawash

Hi iam trying to make dual function visual c++ button what I did was [url]http://www.4shared.com/file/105379147/23d04050/dualactionmfcbutton.html[/url] I want it to work can anyone help me ? Thanks

Member Avatar for hawash
0
105
Member Avatar for losh177

I'm having problems reading taking an input using cin.getlin [CODE][LIST=1] [*]cout << "Enter record: "; [*]cin.getline(title, 100); [*]csis << "Enter record title: " << title << endl; [*]rec->setTitle(title); [*]cout << "Enter performer: "; [*]cin.getline(name, 100); [*]csis << "Enter performer: " << name << endl; [*]rec->setPerformer(name); [/LIST][/CODE] The program jumps to …

Member Avatar for tux4life
0
162
Member Avatar for rizillion

[code=cplusplus] #include <iostream> #include<string> using namespace std; int main() { string str1="Amusement Park"; string str2="going to"; string str3="the"; string str; cout<<str2+''+str3+''+str1<<endl; cout<<str1.length()<<endl; cout<<str1.find('p')<<endl; cout<<str1.subtr(1,5)<<endl; str="ABCDEFGHIJK"; cout<<str<<endl; cout<<str<<endl; cout<<str.length()<<endl; str[0]='a'; str[2]='d'; cout<<str<<endl; return 0; }[/code]

Member Avatar for neigyl_noval
0
94
Member Avatar for csurage

Hi, I was creating a Gui for one of my classes and I hit a major bump. I am trying to take words from a text file and just display it in the text box. I know how to read files, what I don't know is how to change the …

Member Avatar for csurage
0
249
Member Avatar for losh177

Hi, do not know how possible is this but here it goes, i'm trying to declare an array once a program is running. This is how i'm thinking: [CODE][LIST=1] [*]int size; [*]cout << "Enter size of array: "; [*]cin >> size; [*]Holding *holdLib[size]; //this is a base class pointer array …

Member Avatar for losh177
0
118
Member Avatar for ganmo

Hello, I wonder what I need to do to use find() from <algorithm> to search in a vector containing some Struct, with two string vars. I'm not asking for codes now, I just want the principles. I written this, and got compilation error. [CODE=cpp] #include <iostream> #include <algorithm> #include <string> …

Member Avatar for ganmo
0
257
Member Avatar for sacarias40

i need to know how to make a string variable in C++ i need to hold the file path of the desktop on a variable. in vb.net it would be like this: dim path as string = "path\to\desktop"

Member Avatar for Narue
0
76
Member Avatar for Stefano Mtangoo

I'm trying GUI Library to see what fits me. I want to try GTK+ too. But I don't know where to start. At GTK+ site I took a look at C++ bindings [url]http://www.gtkmm.org/[/url] and found * glibmm 2.20 (stable) * gtkmm 2.16 (stable) * libgnomecanvasmm (stable) * gconfmm (stable) * …

Member Avatar for Stefano Mtangoo
0
275
Member Avatar for seao111

Hi all, i was wondering if anybody could help me with this issue. I am trying to create an update tool within c++ which checks the download webpage file to see if it has been updated since the last recorded date. My problem is that i have no idea where …

Member Avatar for Salem
0
149
Member Avatar for khenz

hi guys, i've been battling with this program for too long now... i cant seem to get it to compile. i believe the problem lies in my use of objects being passed to different classes as parameters. (i will do my best to only paste code that i believe is …

Member Avatar for ArkM
0
135
Member Avatar for QuintellaRosa

I have a file format for storing text of any sort. It's a file format from a company, so I can't change it. Basically, in the beginning of the file, a series of "string starts on char#", "string length equals" values determines the "address" where a string starts and how …

Member Avatar for ArkM
0
248
Member Avatar for QuintellaRosa

I'm new to C++ and I'd like to start correctly. But I need to know what are the best practices for code sharing, like: _ use [ICODE] int void (main) [/ICODE] instead of other statements; _ use standard libraries when possible; _ what are the naming conventions for C++? I've …

Member Avatar for Ancient Dragon
0
78
Member Avatar for Liszt

I use this command to check for the Computername wich returns: [code] SystemInformation::ComputerName->ToString(); //returns: MYCOMP-EG03R8F [/code] When manually rightclicking "My Computer" and check what name I have, it says with lowcase letters: [B]mycomp-eg03r8f[/B] So it doesn´t return the correct name. It shows Capitals. But if I do this command instead: …

Member Avatar for Liszt
0
207
Member Avatar for daviddoria

I want to make an input stream parser capable of handling input in any of the following forms: [code] x y z x,y,z x, y, z (x,y,z) (x, y, z) [/code] Is there a clever way to do this? Or do I have to check the first character, if it …

Member Avatar for ArkM
0
83
Member Avatar for dazzclub

Hi guys/gals, ive been reading alot about bots and i kinda like the idea of creating one. can these bots be created in any programming language or does it depend on what i want the bot to do? ive probably posted in the wrong forum, sorry cheers Darren

Member Avatar for siddhant3s
1
120
Member Avatar for dav555

how can i convert a hex value of a byte (unsigned char) to a short value? [code="c++"] unsigned char hexByte = 0x02; short value= ??? [/code] thank you for your help!

Member Avatar for dav555
0
281
Member Avatar for massivefermion

good time people I have a code like the one below: [code=c++] #include <vector> #include <stdio.h> #include "mymath.h" using namespace std; int main(){ int n; char a='y'; do{ cout<<"\n----------------------------------------\n"; cout<<"Enter a number for prime factorization : "; cin>>n; cout<<"\n----------------------------------------\n"; int *result=pfact(n); for(int i;result[i][0]!=0;++i){ if(result[i+1][0]!=0) cout<<result[i][0]<<"^"<<result[i][1]<<"*"; else cout<<result[i][0]<<"^"<<result[i][1]<<"=";} cout<<n; cout<<"\n----------------------------------------\n"; cout<<"Do …

Member Avatar for iamthwee
0
142
Member Avatar for daviddoria

Is it possible to indicate that a class function you are calling is static? [code] class Point { std::string name; public: Point(){} static void DisplayName() { std::cout << "Point" << std::endl;} }; int main() { Point.DisplayName(); //this doesn't indicate the the member function is static //maybe something like this: //static_call(Point.DisplayName()); …

Member Avatar for siddhant3s
0
98
Member Avatar for goyofoyo

hey I am currently working on a Fraction program and the fraction needs to be in lowest terms i have been working on this for a while and I can't figure out what is wrong with it i think i have been looking at it for too long, but anyways …

Member Avatar for goyofoyo
0
112
Member Avatar for losh177

hi, i'm having problems with my homework. I have to create a Base classes from which 2 classes have to be derived, then i have to write a program to test their function. The problem that i'm having is that i'm taking the input from the keyboard and passing it …

Member Avatar for losh177
0
2K
Member Avatar for 215wrestler189

So this is a small part of a bigger project I'm working on. I'm having trouble with having a visual countdown starting from a value the user inputs. I have three elements on the form textBox1 where the user enters the value to start from and label1 where the visual …

Member Avatar for Ancient Dragon
0
88
Member Avatar for Sky Diploma

[code=c++] void func(char*,int&);//A function returning no value and taking a char and reference to int as arguments. typedef void (*PTR)(char*,int&);//A pointer to function returning no value and taking a char and reference to int as arguments. void Func2(PTR);//A Function taking such a pointer as argument. PTR Func3();//A Function returning such …

Member Avatar for Dave Sinkula
0
141
Member Avatar for Slephnir

[COLOR="green"]Hi, does anyone know of a good tutorial for converting 'Ogg' files to 'AVI', I'm using MS VC++ 2008; MFC GUI classes preferred, but i'm still interested in 'Command Line Apps'; I am not using Linux, strictly WinXP. thanks[/COLOR] ;)

Member Avatar for William Hemsworth
0
85
Member Avatar for ShadowScripter

Hey, I've been trying to understand what the hell I'm doing wrong with this code. At the beginning, I include the DDRAW.H, and the code compiles with no problem, but as soon as I try using a function from that header, I get a linker error. The function I used …

Member Avatar for William Hemsworth
0
922
Member Avatar for blackhawk9876

[CODE]Suppose that a stack s and a queue q of characters are initially empty. Show s and q after each iteration of the second for loop of the following code fragment: for(char ch = 'A'; ch <= 'H'; ch++) s.Push(ch); for(int i = 1; i <= 4; i++) { s.Pop(); …

Member Avatar for _Nestor
0
91
Member Avatar for DarkSaint

Problems 1. Results for height and weight output fine but I am trying to have gender change the following boolean assignment statements. 2 different results for height and weight base on either female or male. exp. males height is [COLOR="Red"](height >= 62 && height <= 78)[/COLOR] but for the female …

Member Avatar for DarkSaint
0
82
Member Avatar for newcpp

I have a problem about std::vector as member of class, I'm not clearly about the initialization mechanism [CODE=c++]#include <iostream> #include <vector> using namespace std; class Obj; //this is a Class object class Grid { public: Grid( ) { } ~Grid( ){ } protected: private: vector<Obj> v1; //initialization mechanism ? and …

Member Avatar for newcpp
0
7K
Member Avatar for CppBuilder2006

Hi I have a question. [COLOR="Red"]The aswer is very short [/COLOR]I think. I got many different useful helps in different forums but [COLOR="Green"]still[/COLOR] my main question is [COLOR="green"]not answered clearly[/COLOR]! MY QUESTION: Can a [COLOR="Green"]not inline[/COLOR] [COLOR="Red"]method[/COLOR] have [COLOR="Red"]internal linkage[/COLOR]? This question is simple & clear (if you don't think …

Member Avatar for CppBuilder2006
0
328
Member Avatar for Aelphaeis

ok, I have a very serious somewhat simple problem that I just can't seem to figure out myself. Simply put I want to make a program take the lines Hello How Are You ToDay and output ToDay Are You How Hello Using the End of data marker as a newline …

Member Avatar for Narue
0
289
Member Avatar for cruisx

hi guys, new to c++ here. So we have a school project due tomorrow, a hangman game of sort and i just wanted to go a bit above the required so i thought i would put in a message box. Now i got the working and all but the thing …

Member Avatar for dubeyprateek
0
176

The End.