49,761 Topics

Member Avatar for
Member Avatar for dude1

ive got a xml file like this: [CODE] <?xml version="1.0"?> <orders> <customer> <order_num>6656</order_num> <name>jon doe</name> <street>123 fake st</street> <city>Beverly Hills</city> <state>CA</state> <zip>90210</zip> </customer> <customer> <order_num>1337</order_num> <name>bob johnson</name> <street>1232 something ave</street> <city>Petaluma</city> <state>CA</state> <zip>94952</zip> </customer> <customer> <order_num>5643</order_num> <name>bill story</name> <street>1st ave</street> <city>Beverly Hills</city> <state>CA</state> <zip>90212</zip> </customer> <customer> <order_num>4533</order_num> <name>tom hutchinson</name> <street>214 …

Member Avatar for dude1
0
163
Member Avatar for jemscomput

16 bit ms dos subsystem Turbo c IDE The NTVDM CPU has encountered an illegal instruction cs:0000 ip:0075 op:f0 00 f0 3705.Choose close to terminate the application.

Member Avatar for jwenting
0
105
Member Avatar for CreativeCoding

I would like to do something like this: [CODE]readfilethingy("www.mywebsite.com/update.txt"); //fail[/CODE] with update.txt being this: [CODE]3.4 http://www.newupdatedownloadlocation.com/ //OR just the http location[/CODE] with the result being: [CODE]*user clicks on update button* "NEW UPDATE IS AVAILABLE! :D" *Clicks download* *Download on .exe starts*[/CODE] So, is it possible? I have searched and searched …

Member Avatar for jonsca
0
113
Member Avatar for mrnobody

Below is a simple code that i wrote about VARIANT. The weird thing is at the end of the code, both vtEmpName and vtDept is "Accounting". [CODE] VARIANT vtEmpName; VARIANT vtDept; vtEmpName.vt = VT_BSTR; vtEmpName.bstrVal = _bstr_t("Joe Schmoe"); vtDept.vt = VT_BSTR; vtDept.bstrVal = _bstr_t("Accounting"); [/CODE] On the other hand, if …

Member Avatar for mrnobody
0
142
Member Avatar for vishalkbhatt

hi all... i m working on a C++ prgm with following definition: Program Definition: Write a program to perform the following on a source file of any c++ program(File shud be included): 1. Count the line of code (LOC) of a source code file 2. Count the total number of …

Member Avatar for Ancient Dragon
0
100
Member Avatar for ashishchoure
Member Avatar for ashishchoure
0
84
Member Avatar for lotrsimp12345

Still having trouble install opencv. I used cmake doing what was told and it created files in a folder then i ran the install VC++ project. After which I went back to cmake and generated the examples. ran those. My path environment variable is C:\OpenCV2.0\bin, I was wondering whether it …

0
57
Member Avatar for Icebone1000

I have something like this: [CODE] VOID *pVBRes; ... pVBRes = new vposnormaltex[(Vfaces.size()/3)]; ... dynamic_cast<vposnormaltex*>(pVBRes)[i].pos = .. reinterpret_cast<vposnormaltex*>(pVBRes)[i].tex = .. reinterpret_cast<vposnormaltex*>(pVBRes)[i].normal =.. [/CODE] What cast should I use ( IF I should use, I dont know if it will work..)

Member Avatar for Salem
0
105
Member Avatar for roc a

I have started this program and it builds fine but when I debug it I get a run-time check error #3, the variable total_sales is being used without being defined. Can some one help me out with this?[code]#include <iostream> using namespace std; void main() { int sp[10][7] = {89, 92, …

Member Avatar for thomas_naveen
0
213
Member Avatar for murschech

A rather old C++ book I have says that one class may be declared a friend class of a second, and then the first class can access the private data of the second. I tried this example [code] #include <iostream.h> class secret { friend class not; private : int a; …

Member Avatar for Abivino
0
126
Member Avatar for CVlaxstar

Hey guys, I'm mostly done with this but need a little help with multiplication and the output. (Just outputting +'s) [CODE]#include<iostream> using namespace std; class Polynomial { friend ostream &operator<<(ostream&, Polynomial&); private: int degree; int coefficient[10]; public: Polynomial(int, int[]); Polynomial operator+(Polynomial&); Polynomial operator-(Polynomial&); Polynomial operator*(Polynomial); }; Polynomial::Polynomial(int d, int c[]) …

Member Avatar for Lerner
0
136
Member Avatar for cruisx

Hey so i am trying to create a file and this is part of my code. [CODE] HANDLE hFile; if((hFile = CreateFileA("Testfile.txt", GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, 0, 0)) != INVALID_HANDLE_VALUE) { //and so on [/CODE] Now the problem is that i cant create the file in the program(exe) path. I …

Member Avatar for Frederick2
0
134
Member Avatar for dabboo

Hi, I am new to programming. As an absolute newbie, I downloaded codeblocks and wrote my first programme i.e. Hello World. But when I hit F9 key of my keyboard, the programme didn't run. Can someone guide me as to how a programme is run after writting it in the …

Member Avatar for dabboo
1
91
Member Avatar for Tech E

I have looked and looked and looked at this. I can not figure out why I am getting a random crazy number for salary. Can someone please help? (Sorry for the length) [CODE]//Personal Class Definition #include <iostream> #include <string> using namespace std; //Personal class definition class Personal { public: Personal(string, …

Member Avatar for WaltP
0
163
Member Avatar for mrnobody

Hi, I'm doing a code in MFC to retrieve DateTime from SQL 2005 and then after do datetime manipulation on it. In the SQL table, the date field is 3/16/2010 2:28:20 PM (obtained by using getdate()). I then retrieve the date from RecordSet and stored into _variant_t. To confirm that …

0
66
Member Avatar for thedonflo

I need help writing this program and it has to have user input. It has to be C++ language 1) Write a program that displays the following diamond shape. You may use output statements that display either a single asterisk (*) or a single blank. Maximize your use of repetition …

Member Avatar for Lerner
0
114
Member Avatar for thedonflo

I really need help with this project. 1) Write a program that uses a switch program structure 2) Upon user input your switch structure shall calculate and display one of the three loops for loop, while loop, and do-while loop calculations.

Member Avatar for Stefano Mtangoo
0
111
Member Avatar for dwdude

Hello there. Finally decided to make an account here :) Anyways, I just started trying to implement function pointers in my code, and I seem to be having a few issues. (this is, of course, test code): [CODE] #include <iostream> using namespace std; class MyClass; class SomeClass { public: SomeClass(); …

Member Avatar for dwdude
0
2K
Member Avatar for naveedmahar
Member Avatar for rectifryer

[CODE]#include <cstdlib> #include <iostream> #include <cmath> #include <iomanip> #include <cctype> using namespace std; double distance(double,double,double,double); double radius(double,double,double,double,double); int main() {double X,secX,Y,secY,z,r; r=0; cout<< "Please enter the x value of the center of the circle:"<< endl; cin>>secX; cout<< "Please enter the y value of the center of the circle:" << endl; …

Member Avatar for Banfa
0
398
Member Avatar for janice777

basic over view>> banks offer car loans for periods ranging from two to five years (24 to 60 months). Write a program to allow the customer to enter the price of a car, the down payment amount and the annual interest rate of the loan. The program should display the …

Member Avatar for janice777
0
185
Member Avatar for tararengan

hello, I am running a merge sort routine on an array of numbers. My intention is not to output the sorted array but to reorder the indices of the array so that they reflect the sorted order (descending). For example, if the array were {2, 7, 4}, my indices would …

Member Avatar for tararengan
0
121
Member Avatar for Phil++

Hey, I'm writing this report and I'm writing about variables.. I'm just checking to see if this is a good description: [I] Variables are used in programming to allocate specific memory locations for data, Variables enable the programmer to give a specific name to where the information is stored in …

Member Avatar for WaltP
0
82
Member Avatar for nerdy900

I was starting a cash register program. I got to the point of a simple test. I ran into a problem where when running the loop to input my variables, it completely blows through the loop the first time. I looks like this: Product: Product: ---------now I could input [CODE]#include …

Member Avatar for nerdy900
0
134
Member Avatar for RayvenHawk

I'm doing an assignment for my AI class and while trying to compile the sample code from this weeks chapters I get the 2 following errors. I'm certain I've tackled this before in my 3d programming class, but that was almost a year ago and I'm drawing a blank here. …

Member Avatar for daviddoria
0
142
Member Avatar for StTheo

I'm working on an AVL tree, and I've been getting segfault errors when trying to access one of my nodes. The error is raised when I try to call the balance() function for one of my node's children. [code=c] ////////////////////////////////////////////////////////////////////// /// @file main.cpp /// @brief The main implementation file ////////////////////////////////////////////////////////////////////// …

0
42
Member Avatar for SilentDuck

I'm trying to create this pattern: [url]http://mathworld.wolfram.com/Rule60.html[/url] I cannot get my code to print this. It runs, it just does not print the right pattern. I know I am doing something wrong, I'm just not sure what. [CODE] #include <iostream> #include <fstream> using namespace std; int main() { //Declare variables …

Member Avatar for Banfa
0
208
Member Avatar for Valaraukar

Hi, Basically I have a game type scenario in which objects are falling from the sky onto uneven terrain below but my problem is this: I can't figure out how to determine when an object has actually collided with a slope (the point of impact) because obviously the y value …

Member Avatar for Fbody
0
89
Member Avatar for timbomo

Im trying to figure out how i will calculate items needed. for example for every 500 sqft of space, one gallon of paint and 8 hours of labor is required. how will i put that n to a formula

Member Avatar for timbomo
0
202
Member Avatar for eternaloptimist

/*could someone show me how to create a text file named names.dat with names in a directory with an executable file? i want this program to find a name after i enter it. here r the names that i want to put into names.dat.:*/ "Collins, Bill", "Smith, Bart", "Allen, Jim", …

Member Avatar for Lerner
0
136

The End.