51,593 Topics

Member Avatar for
Member Avatar for anthonytan

[Warning] It not the completed code. its just a rough idea[CODE] do{ printf("Please enter a number :") scanf("%d", &no); if (no <=0) printf("invalid"); }while(no<=0); [/CODE] Hi Guys! I've a issue with scanf. First loop the program. I entered '1', a valid input. Once i retry the program, i entered a …

Member Avatar for anthonytan
0
131
Member Avatar for tech291083

Dear Friends, First of all, I would like to apologize to forum administrator if this is not the right place for my thread. Forgive me if you can. I just want to tell you all in general and forum/site owners what a fine job they are doing and expanding the …

Member Avatar for tech291083
0
198
Member Avatar for mrnutty

Some of us were having some discussion about posting some challenge question for the community to participate in. This way people could learn from the more experienced person's solution. Here is the question that : Intro : [b] [ICODE]A multiplied Sum Of digits is the sum of the digits of …

Member Avatar for mrnutty
0
148
Member Avatar for 28daniela28

Hi, I want to read/write data from a file and I don't know how (I'm using Visual studio c++). More exactly, if I have the following code: [CODE]#include<iostream> #include<fstream> using namespace std; int main() { ofstream newfile; newfile.open("exemplu.txt"); myfile<<"I want to write this in a file\n"; newfile.close(); return 0; }[/CODE] …

Member Avatar for 28daniela28
0
114
Member Avatar for spiderphp

Given a system of n independent linear equations ([I]n[/I] equations in [I]n[/I] unknowns). Write a program to solve these equations using Gaussian Elimination method with scaled partial pivoting. In other words solve the system Ax=b(where the n*n matrix A, and the vector b are known) for the values of unknown …

Member Avatar for jonsca
-2
104
Member Avatar for Adrhian77

how to create asterik star like this [B][COLOR="Red"]>[/COLOR][/B] with 10 Asterik star (*)

Member Avatar for Nick Evan
1
103
Member Avatar for invincible35

Hello friends, I have two laptops. One of them has a window application software which is working perfectly in that system. But now i want to copy the same software in other laptop but couldn't do so. I have the original CD of that software but somehow it doesn't seem …

Member Avatar for Nick Evan
0
84
Member Avatar for emmawatson4u

Here's a question for you. create two arrays to store roll and marks of students respectively whose name will be known at run time (use pointers)

Member Avatar for Stefano Mtangoo
-3
47
Member Avatar for sivaprakas
Member Avatar for kevintse

I am building applications targeting Windows Mobile, I need to read and write files. I am not sure whether to use the C++ standard library (iostreams) or the Windows API (ReadFile(), WriteFile()...). I think the Windows API is faster than the C++ standard library, but they are not object oriented, …

Member Avatar for Frederick2
0
232
Member Avatar for abuaqrab

[code]#include <iostream> #include <fstream> //#include <scientific> using namespace std; main () { ifstream in; ifstream in1; ofstream out; out.open("electrons.dat"); double x,y,z,electronenergydeposit,gammaenergy; int nlines = 0,nlines1=0,electronparent,electrontrack,electronevent,electronevent0=-1,gammaevent=-1,gammatrack,gammaparent,stepNo,process,creatNum; long pos, poscurrentevent=0, posnextevent=-1; // TFile *f = new TFile("Depos.root","RECREATE"); // TFile *f1 = new TFile("gammas.root","RECREATE"); in.open("Depos.dat"); in1.open("gammas.dat"); while (!in.eof()) { in>>electronevent>>x>>y>>z>>electronparent>>electrontrack>>electronenergydeposit; if (electronevent==electronevent0) in1.seekg(poscurrentevent); …

Member Avatar for Ancient Dragon
-3
104
Member Avatar for guest7

Hi, I am using the following code to convert character array in file to integer. However, the problem is that there is only one place in the file where it does not convert the character array to integer correctly. Since my code is big, i am pasting the most relevant …

Member Avatar for Ancient Dragon
0
156
Member Avatar for Valaraukar

Hi, I'm writing a program in C++/OpenGL as part of a university assignment but I am having difficulty using the function glBindTexture to bind my loaded textures onto the models that I load in and render. I can actually wrap the texture around my 3D model no problem but I …

Member Avatar for Valaraukar
0
261
Member Avatar for Waylon

Hello! I'm working on this roguelike and I'm trying to make it so that the different "maps" can be loaded from text files. It was going pretty good until I tried to get it to return the filled array. Take a look: [CODE]void getMap(string str[10][10]){ ifstream myfile("world1.txt"); int a = …

Member Avatar for Lerner
0
106
Member Avatar for Excizted

Hi. I have a little question, that which answer may mean death to my class plans. I have a superclass (or parent class if you will) that I have to delete when I'm done with it, but does that affect the subclass (or child class if you will)? Simple question, …

Member Avatar for Excizted
0
164
Member Avatar for green_leav

hello members...........i need a help from someone to give me an idea of how can i write a code for cryptex i have an assignment and i couldn't figure out how to start writing a code i just need an idea of how the program will work in order to …

Member Avatar for green_leav
-1
290
Member Avatar for Alex_

hello, i'm trying desperately to recover my c++ knowledge. I haven't done c++ for a year and now i'm facing some problems. Please help. I. How to type cast this: [code=c++] class A { virtual c Read(); } class B: public A { public c Read(){ D d ; return …

Member Avatar for Narue
0
113
Member Avatar for rafaqat hassan

hi my problem is that whan i want to add 2+3 i enter it in postfix 23+ it give me 5 which is correct but whan i want to add 20+30 i enter 2030+ it add me 3&0 because i use char so, this progm is limited to 1 digit.so …

Member Avatar for Lerner
0
77
Member Avatar for littledani

:(i need some help... if anyone of u can give me the programs or any sure hints... den i'll be very greatful to u....

Member Avatar for rafaqat hassan
-9
111
Member Avatar for spitfire

I am getting errors when trying to compile my program, can anyone help? Errors are error C2143: syntax error : missing ')' before 'constant' error C2143: syntax error : missing ';' before 'constant' fatal error C1004: unexpected end of file found Here is my code: [code] // declaration of a …

Member Avatar for wish_C
0
593
Member Avatar for inmar

Hi, I'm trying to use the system() command to invoke "eseutil.exe" and store the output in a text file using VC++. The way i used this command is mentioned below. code snippet: ========= [CODE]string command= "\"C:\\Program Files\\Microsoft\\Exchange Server\\Bin\\eseutil.exe\" /mh \"F:\\fsg\\edb\\mailbox database.edb\" | find \"Log Required\" >output.txt"; system(command.c_str());[/CODE] Compilation is success. …

Member Avatar for donaldw
0
416
Member Avatar for BobFX

Hi, I need to convert a BSTR buffer (that contains wchar data) to a straight char*. How can I do that? I only found that info so far: [url]http://msdn.microsoft.com/en-us/library/ms235631(VS.80).aspx[/url] but it covers only CComBSTR types. I'm not sure how CComBSTR and BSTR relate. Thanks.

Member Avatar for BobFX
0
327
Member Avatar for manosha

HI, I have a prog. assignment, I did most of it, but I couldn't write some functions properly, so try 2 help.? these are the functions I wrote b4.[CODE] #include "Array.h" #include <iostream> using namespace std; Array::Array() //constructor to set size=6 { size=6; } void Array::read() // read array elements …

Member Avatar for DanielGreen
-2
121
Member Avatar for Argo54325

Hello, could someone please tell me how to add buttons, list boxes, tabs, etc. to the main window that shows up with the menu when you first create a win32 windows application? I've been searching for this on Google for about two weeks now and keep coming up dry, any …

Member Avatar for marco93
0
153
Member Avatar for omoz4real

Hi everyone, please i created a[COLOR=#000000] C# windows application to implement a form with a ListBox, a TextBox, an Edit button, an Insert button, a Delete button, a Update button and an Exit button in the form. I want my C# program to be able to copy the columns of …

Member Avatar for youtubeline
0
160
Member Avatar for thewonderdude

Hello, I have to read from a .txt file which has info as such, 10:5:23 2:343:54 1:4:7 and so on. 3 Columns, lots of rows. How can i read each column for example 10 to x, 5 to y, 23 to z.

Member Avatar for jonsca
0
139
Member Avatar for Ruffio1981

I'm working on a bonus project for my C++ class. The original problem was to add two large numbers given by the professor, or more specifically, write a program that would add these two numbers. After a while I got it working, relitively easy bit of code with some pointers …

Member Avatar for DanielGreen
0
108
Member Avatar for ivanhny

It's probably really obvious, then again I don't know much about trees in c++. When I try to insert an integer into the tree it doesn't travel down the tree and insert the integer. I'll post the function and then the whole enchillada after. Also how can I create a …

Member Avatar for DanielGreen
0
95
Member Avatar for coolcool

Hi everyone, Am just a beginner in c++ and have wishes to become good in it..it doesn't mean i should become a expert but just a good programmer. also i have enrolled for a competition in the college which am studying which requires an application to be developed using cpp..can …

Member Avatar for DanielGreen
0
112
Member Avatar for laelzio.mosca

I have this tic tac toe code, it`s almost working, can anybody take a look, I think the only thing wrong is in the else statement in main, but I`m not sure, I think I need to place the checkToWin and checkToBlock functions properly in main [CODE]// Laelzio Mosca // …

Member Avatar for jonsca
0
109
Member Avatar for valtikz

anyone knows how to play sounds(wav, or mp3) in (linux)fedora 10 using gtkmm with c++? I only have: [CODE]system ("mpg123 test.wav");[/CODE] but every time the sound will play the program will stuck until the sound has been ended. The sound and program must play at the same time. Thanks in …

0
64
Member Avatar for dalymiddleboro

Hey there I am getting an unusual error message I don't quite understand. I was wondering if I could have some help. The error is " error C3861: 'Tests_weight': identifier not found" I hope you guys can follow the code and any helpful input would be greatly appreciated! Thanks in …

Member Avatar for jonsca
0
74
Member Avatar for mubdea
Member Avatar for jonsca
-2
240
Member Avatar for Alibeg

Hi guys. I have a question - searched for it for at least an hour (i think more, but nevermind). I have this piece of code: [code=C++] cout << word.getLastWord() << "<---" << '\n'; [/code] It is supposed to call getLastWord method of class called Extract. Method returns a pointer …

Member Avatar for Alibeg
0
234
Member Avatar for Alibeg

I guess i'm missing something basic, but i'm new to C++ and do not know how do these streams behave. Can someone please explain why no text is printed to the screen in the following example: [code=C++] #include <iostream> using namespace std; int main (void) { char *ptr = NULL; …

Member Avatar for Alibeg
0
163
Member Avatar for suho

I want to create an mpeg video with [B]ffmpeg[/B] with my program that generates lots of 2D arrays, each of which represents an image. As ffmpeg only takes YUV images. Is it possible to draw a YUV image in c++ or should i generate a RGB image first and then …

0
58
Member Avatar for knish

Hi, how is it possible to make vertices in maya (3d s/w ) react to wind ( dynamic effects ). Brgds, kNish

Member Avatar for Rajesh R Subram
0
100
Member Avatar for t0wel

Hello DaniWeb members! I am using wininet for communicating with HTTP protocol.Everything goes right expect one thing: Cookies. Problem is that all cookies are not saved.Some of them are but no all.For example ASP.NET session id cookie doesnt get saved when i visit page with wininet but i need its …

0
35
Member Avatar for eptheta

can anyone here write me a program which takes data from my parallel port (at address 0x378) every 1 second and saves it to a .txt document somewhere on my computer. I wanted this in c++ or c or any other programming language that i can instantly use or compile. …

Member Avatar for Rajesh R Subram
-2
217
Member Avatar for vino chithra

how can we use very big numbers in a c++ coding ... eg a number which is some 40 digit long... i just found out tat there is some data type known as biginteger ... but its not working in turbo c even after installin reqiured files... can anyone help …

Member Avatar for Rajesh R Subram
0
86
Member Avatar for samsons17

hi... i want to ask about my receipt program again.. this time ,i really like to know the ways how to clear the informations after the user has entered those informations that are neede by the program.. For example,take a look at this sample output : -------------------------------------------------------------------------------------- CASH RECEIPT PROGRAM …

Member Avatar for DarkC0de
0
142
Member Avatar for muzamal

hi i am muzamal.i have a assignment question .somebody can help me. please send me code of this programme.i tried hard but not succeeded.please help me early.emergently send me please .because time is short for me . thanks[COLOR="Red"][/COLOR]

Member Avatar for Lerner
-1
99
Member Avatar for rsaska

Hello, I am using Visual Studio 2008 to program in C++. My program needs to read in a line, break it into two strings. It seems that the String Toolkit Library (StrTk) ([url]http://www.partow.net/programming/strtk/index.html[/url]) will enable this. However, I am unable to figure out how to physically add the library files …

Member Avatar for rsaska
0
166
Member Avatar for BobFX

I have a very basic problem, which answer is not covered in the 1200 pages of the C++ book I'm using to teach myself. Consider this simple code: [code]#include "stdafx.h" using namespace System; class EventListener { long mRef; public: EventListener() { mRef = 0; } }; int main(array<System::String ^> ^args) …

Member Avatar for BobFX
0
131
Member Avatar for pangdo

1. I have few data in "MyData.txt" : 9 7 4 4 6 5 9 1 3 4 7 6 5 4 1 4 8 6 4 8 5 I only can copy the data into the code like this : [CODE] #include <iostream> #include <fstream> using namespace std; int …

Member Avatar for jonsca
0
114
Member Avatar for gehring

Hi, I Have a CString (MFC) which contains the following three conditions separated as follows. Message=("Condition1|Condition2|Condition3") I am trying to extract the three conditions from the CString and use them to perform other operations. However I cant seem to find the right built-in function. Could someone please advise on what …

Member Avatar for MrSpigot
0
129
Member Avatar for Zay

hello; can U plz explain this Q for me, i do not know how to solve it ? Rational fractions are of the form a / b, where a and b are integers and b ≠ 0. In this assignment, by "fractions" we mean rational fractions. Suppose a / b …

Member Avatar for NicAx64
0
174
Member Avatar for neha_38

HELLO! I AM IN NEED FOR [B]MCTS 3.5 FRAMEWORK(C#) 70-536 EXAM [/B][COLOR="Green"]DUMPS[/COLOR]. PLEASE CAN ANYONE PROVIDE ME THE LATEST DUMPS OF 70-536 WHICH ARE FREE TO DOWNLOAD. OR IF ANYONE HAS IT WITH THEM PLEASE MAIL THEM TO ME AT [I]<<snip>>[/I] THANKS IN ADVANCE.

-3
55
Member Avatar for alvinwong

Hi, I am using Dev-C++ 4.9.9.2 with g++ compiler. I recently made a DLL in c++ that shows a window using Windows API. I discovered that the text shown inside are large and bold, which aren't looking very good. I want to change this, so I used the following code …

Member Avatar for alvinwong
0
1K
Member Avatar for WhatTheDeuce

I'm trying to figure out how to use a bubble sort in a array of names. since the names are type string, I can't figure out how to alter the bubble sort to do this. all the examples I find online deal with numbers instead of strings. So how do …

Member Avatar for mrnutty
0
138

The End.