49,757 Topics

Member Avatar for
Member Avatar for Squires

I am pretty proficient in C++ and Java. I know that most progrmas could be written in either language. My question for those of you who have been out there for a while, do companies tend to use one programming language for certain types of programs? For example, is C++ …

Member Avatar for surojit das
1
276
Member Avatar for ashima 2
Member Avatar for dhruv_arora
0
131
Member Avatar for fernandofranca

My entrada.txt jas the following contents: [code] #Commented text #This should be used like: #Bar:Bar_number:Type_of_the_bar; # # Bar:1:PV:1.05 [/code] So the lines that starts with # are commented so the program will not process them. Everything is working fine, but when I used getline() to delimit the string on ":" …

Member Avatar for fernandofranca
0
979
Member Avatar for flaviusilaghi

What is the correct way to declare a multidimensional array. I tried like this [CODE]unsigned char** intext=new unsigned char*[16];[/CODE] but i get a bad_ptr.

Member Avatar for flaviusilaghi
0
157
Member Avatar for fernandofranca

Hi, I´m having problem while converting char to string. [code=c] #include "stdafx.h" #include <fstream> #include <cstdio> #include <iostream> int main() { std::ifstream arquivo("entrada.txt"); if (!arquivo) { std::cout << "Arquivo não encontrado" << std::endl<< std::endl; system("PAUSE"); exit(0); } std::string token; char arquivo_linha[255]; while(arquivo) { arquivo.getline(arquivo_linha,255); if (arquivo_linha[0] != 35) { token …

Member Avatar for fernandofranca
0
195
Member Avatar for fernandofranca

I´m using Visual C++ Studio and when I include another .cpp file it doesn´t takes all the what have been included before. Here is an example: main.cpp [code=c] #include <iostream> #include <string> #include <sstream> #include "readtext.cpp" int main() { teste(); return 0; } //readtext.cpp void text() { printf("teste"); } [/code] …

Member Avatar for nbaztec
0
199
Member Avatar for web3

Can anyone tell me what GUI to use? And is there a GUI similar or same like standard library? Thanks in advance.

Member Avatar for Stefano Mtangoo
0
211
Member Avatar for MaestroS

Well, I wonder HOW to make an explode() function from PHP in C++ For those who don't know. explode($separator, $string) breaks given $string through given $separator for example: [code] $string = "Hello world!"; $result = explode(" ", $string); echo $result[0]; //IT will give us HELLO word echo $result[1]; //IT will …

Member Avatar for Stefano Mtangoo
0
867
Member Avatar for avarionist

Im working on a program to get single characters from a string and i guess im doing it wrong but i was using strok() to tokenize the string in the hopes that it would do so but anyway this is what ive got so far and before you ask its …

Member Avatar for NathanOliver
0
373
Member Avatar for highflyer8

Hi, I have to calculate the exponetial of a large (on the order of 10^5) negative number. I tried using exp(), the exponential function from the cmath library, but I get an answer of 0. So, I tried to use the power series for the exponential function. For numbers from …

Member Avatar for arkoenig
0
998
Member Avatar for JIMITRIS

I please want to ask if anybody knows how to install allegro without use of terminal..

0
73
Member Avatar for aliyami90

Hi everybody . i have a problem that i have been trying to solve for weeks can u help. this is bonus problem given to me by my professor in college. hers is the description: menu driven library: 1. list books 2. add books 3. find books a. by id …

Member Avatar for NathanOliver
0
822
Member Avatar for vbx_wx

i need some help: i have something like: word1:word2:word3:word4 ...read from a file,how can i do,when i read this line,each word delimit by ":" to put into a string.... string str1,str2,str3,str4; str1 = word1; ........... str4 = word4; sorry for my english i hope eu understand

Member Avatar for daviddoria
0
131
Member Avatar for Grusky

Ok, I am about 20+ hours into this utterly confusing idea of link lists. The classes I have are listed below. I cannot for the life of me understand how I would write a reverse function. My office floor is cluttered with printouts and scribbles from trying to make this …

Member Avatar for daviddoria
0
132
Member Avatar for iamcreasy

No programs are running.Both is Visual Studio and Codeblocks... both are showing the following error, [B]LINK : fatal error LNK1104: cannot open file 'kernel32.lib'[/B] I have google it, some say setting environment to "C:\Program Files\Microsoft SDKs\Windows\v5.0" or reinstalling visual studio, or editing registry key "HKEY_CURRENT_USER\SOFTWARE\Microsoft\MicrosoftSDKs\Windows\CurrentInstallFolder"(i didn't find any MicrosoftSDKs under …

Member Avatar for iamcreasy
0
2K
Member Avatar for abhi74k

Why is the constructor called from top to bottom rather than bottom to top ????

Member Avatar for abhi74k
0
146
Member Avatar for abhi74k

I read that the initialisation of the vptr is done by the default constructor automatically . What happens when u provide implementation for the default constructor . Is the initialisation code added automatically ???

Member Avatar for abhi74k
0
50
Member Avatar for dchunt

I have a file over 100 Kb long. I want to perform operations on successive batches of 256 characters. [CODE] int fs=0; char ss[32556]; ifstream nm,nm1; nm1.open("as86.txt"); if(nm1.is_open()) { nm1.seekg(0, ios::end ); fs = nm1.tellg(); } nm1.close(); nm.open("as86.txt"); nm.read(ss,fs+1); nm.close(); cout << endl << fs << endl; ofstream mn; mn.open("as86.txt"); …

Member Avatar for nbaztec
0
103
Member Avatar for SJP99

I know this gets asked a lot but i want to make a program that sends me some form of an alert at a certain time of day. I am using windows 1. i want it too run invisibly so no windows, doesn't show in task bar, or task manger …

Member Avatar for SJP99
0
144
Member Avatar for charlie4oct

hey please can anybody guide me how we can take input from the command prompt as we do in C++ and Java. I can take input using .dat files but I want the user to give input in the command prompt. I will be very thankful.

Member Avatar for nbaztec
0
78
Member Avatar for katmai539

Hello, yesterday, a friend of mine who develops in all kinds of languages but mostly VisualBasic.NET, told me he only listens to the regular kind of pop and rock, and sometimes to heavy metal kind of things. But -he told me- when he had something to do in C-style code …

Member Avatar for Bench
1
248
Member Avatar for Roelof Wobben

Hello, For a exercise I have to make a programm where several student puts thier home-grades in and thier names. here's the code [code] #include <string> #include <vector> #include <iostream> using namespace std ; int main() { vector<string> names ; typedef vector<double>::size_type siz_tp ; siz_tp aantal ; vector<double> numbers; typedef …

Member Avatar for Roelof Wobben
0
95
Member Avatar for Leppie

So close (I think)! I've been working on this for some time now (on and off, coming back to it) and now I'm stuck. Hopefully there's not to much wrong with the coding of it, the compiler throws up lines 50 & 63 with errors? Not to sure if I've …

Member Avatar for Leppie
0
164
Member Avatar for adamomo

Hi I am trying to create a tester to check a server-client application assignment. When I try to run the server in the background I can not properly start clients - one different terminals I do manage. I am looking for a mechansim to automatically create a server and a …

Member Avatar for nbaztec
0
116
Member Avatar for meepokman

Hi guys, I'm currently trying to produce a facial detection application, but I seem to have some problems. My program, is able to recognise multiple users, and match their captured image to one saved in the database. However, if a person who has not registered is photographed, it is supposed …

Member Avatar for meepokman
0
393
Member Avatar for KAY111

[CODE=C] #include <math.h> void greedyMatch() { Xnode *u; Ynode *v; arc *e; forallXNodes(u,G) { assert(!u->isMatched()); forallOutArcs(e,u) { #ifdef STATS stats.searchArcCnt++; #endif v = e->head(); if (!v->isMatched()) { #ifdef STATS stats.mVal++; stats.greedCnt++; stats.flowArcCnt++; #endif v->match(u); u->match(v); break; } } } } void augment(Ynode *last) { Ynode *v, *v1; Xnode *w; arc …

Member Avatar for arkoenig
0
113
Member Avatar for mattloto

I am interested in using DirectX to make games. I'm using MinGW, which is a windows command line port of GCC. How would I get it so that DirectX 10 is included in the files? It probably is in the headers, but I don't know which to include because most …

Member Avatar for Ketsuekiame
0
274
Member Avatar for akssps011

I am new to C++ in terms of large projects distributed over various source files. When I compile(gcc compiler) I get the following error: undefined reference to 'C::C()' I have this code: [B]/src/lib/abstract/[/B]A.cpp [CODE] #include "src/plugins/geo/C.h" #include "B.h" class A:public B { public; A() { B m_b; } void speed() …

Member Avatar for akssps011
0
160
Member Avatar for hisugan

...well i would like to practice c++ by analyzing the logic of the sample programs.... ..thank you for your help.. i really appreciate it...

Member Avatar for Ketsuekiame
0
80
Member Avatar for Schoorsteen

Hey there, I am attempting to open Firefox using C++ on Linux (Ubuntu). However, I get an segmentation fault. What am I doing wrong, and what should I do? [CODE]std::cout << system("/usr/bin/firefox") << std::endl;[/CODE] /usr/bin/firefox works in commandline and when I run this program in debug mode in Netbeans, firefox …

Member Avatar for daviddoria
0
572

The End.