64,152 Solved Topics
Remove Filter ![]() | |
After fixing some pointer problems with my structures, I decided to move the functions performed on them to another .cpp file. Here's the definition in my [B]main.cpp [/B] above the int main() of course [CODE][B]struct[/B] employee { [B]char[/B] name[[COLOR=Navy]20[/COLOR]]; [B]int[/B] schedule; [B]int[/B] level; }; [B]struct[/B] employee salesdept[[COLOR=Navy]10[/COLOR]];[/CODE] then in my … | |
I have a program that calls a function to generate an array of structures( data_set ). The structures consist of a char[20] and 2 int data types. Now what I'm trying to do is randomly pick from an enumerated data type and here is the code I have with a … | |
Could anyone define "Memory leaks" well ? 'cause pretty hard for me to understand with C++ books. | |
Hi, I am making some software for microchips. I am currently developing some algorithms or the PC, and was wondering if there is a way to access a mouse button in very simple C, not c++, in the form of a variable, either on or off. Also, switch bounce is … | |
Hi ladies and gents, I'm trying the next exercise: Write a function value, wich adds the decimal numbers of 'n' together and return the result of this into main? For example: 0.1234 = 10 0.01234 = 10 0.3286 = 19 What Ive got so far is this: [CODE] short amount … | |
"THINKING IN C++" a real cool book in C++ is available online and can be down loaded free of charge. The site is!!! [URL=http://www.codecuts.com/mainpage.asp?WebPageID=315]http://www.codecuts.com/mainpage.asp?WebPageID=315[/URL] | |
I have the following code: [php]$rebate_query = tep_db_query("select * from " . TABLE_REBATES . " where product_id = " . (int)$HTTP_GET_VARS['products_id']); $rebate_information = tep_db_fetch_array($rebate_query);[/php] This should return only 1 row of data I have this code - " [php]$rebate = $rebate_information['rebate_amount'];[/php] " for extracting the rebate amount. For the life … | |
"Invalid procedure call or argument" As I try to remove an item from a listbox call List1 I try this code... If List1.List(i) = List1.List(i + 1) Then List1.RemoveItem (i) if the list contents are identical, remove one of them but it doesn't work! | |
Hello everyone! I've been programming in PHP for 1 year and now I am looking forward to learn a computer programming language, but I am confuse...since there are several langauges out there. So what language you recommend? Thanks! | |
i wanna start programming with c++ what would you guys suggest is the best compiler program out at the mo? :twisted: | |
[SIZE=2][B]TO CALL OTHER PROGRAMS FROM WITHIN OTHER PROGRAMS-[/B][/SIZE] Just include the standard c header file cstdlib (no .h!!). You can now use the function system( :eek: ). It takes only one parameter- the name of the program you want to call! Here is an example [CODE]#include <iostream> #include <cstdlib> // … | |
I want to make a program that will start off by opening a text file(blank). The user will put an expression in the file and as he hits the enter(enters a newline character) the result will be shown in the next line of the same open file. Itz almost like … | |
Ok, im new to c++ and i looked around and couldn't find anything on it.. I have a global char such as the one below, i made a loop to go through and basically "grab" each name in the names list and then display it to me.. but instead of … | |
Hi, i am currently wanting to create a VBS script that will do the following in this order: run gpedit.msc then close delete the default user folder in "c:\documents and settings" delete the gpedit folder in "c:windows\system32" copy the "default user" folder from my "memory stick" to the "documents and … | |
Hi, I want to know the date when is a file was created plus the size of the file. Can somebody show me a vb code that handle this things. Thanks in advance. Newvbguy | |
How do you start/launch a 3rd party *.exe from within a VB.NET application. The program we want to run do have a few command swithces. | |
Hi, I'm trying to make a backup program but suddenly i got stock with this problem. I want to search all the .txt file in my drive c: and make a zip file on their respective folders. Can somebody share a code for this one? Thanks in advance. Newvbguy | |
I am not shamelessly promoting this book, I just happen to like it and use it a lot! "Standard C++ Bible" by Stevens and Walnum, published by Hungry Minds. This 800 page plus book is loaded with samples and comes with a CD-ROM containing all the samples and a nifty … | |
can anyone come up with a solution for this ? real quick for me? the factorial of a nonnegative integer n is written n! ("n factorial") and is defined as follows: n!=n*(n-1)*(n-2)*.....*1(for values of n greater than to 1) and n!=1 (for n=0 or n=1). For example, 5!=5*4*3*2*1, which is … | |
I'm trying this new project, like this. Write a program which will use functions to compute the distance between 2 points on a plane given their coordinates. If one point is located at (x1,y1) and the other is located at (x2,y2) then the formula for computing the distance is sqrt(sqr(x2-x1) … | |
I have random numbers such as 1 6 8 5 7 3 9 2 4 in a 1 dimensional array what for loop do I use to reorder the numbers from 1 through 9? thanks. | |
Hello Everyone, I'm a problem with a recursive C function. Before I explain the functionality of the code, I'd like to give a brief explination of what I'm trying to do. I'm working on a general tree data type which represents entities, each of which has a list -array- of … | |
Hello, i'm a novice who have some ideas of the basic concepts and some advanced topics like templates and exception handling. I now want to improve my programming skills. I would very appreciate if anyone could recommend some good books to me. :) | |
| |
Hi Guys, it's me again! I have been posing memory-related problems for the past few days because I don't seem to understand what is the problem with my code. I kind of figured it's due to memory issues....so here's my question. Suppose I have a (first in first out) queue … | |
Does anyone know how to compare a old style character string with a character in qoutes? Example: I want to compare the first character in a record that is stored in an old style character string with a `*`. Here's what I have in my code: char FirstCharacter[1]; // Character … | |
I'm stuck, I have a base class String, derived class Pstring, and trying to develop another derived class Pstring2. Pstring2 needs a function called left. Main will call the function by Text.left(Text1,N) // Text2 is assigned the leftmost N characters from Text1. I'm having a hard time understanding how to … | |
hi i have just got my self a Borland 4.5 from ebay and would like some help in using it. i am very new to programing and i would like to be able to put a shoping cart on my website but i know nothing about it all help very … | |
in a book there is a code that i am trying out and my compiler keeps giving me diferent errors (compiler is Borland C++) and i dont know how to fix them. the code is [code] //----------------------------------------------------------------- // Skeleton Application // C++ Source - Skeleton.cpp //----------------------------------------------------------------- //----------------------------------------------------------------- // Include Files … | |
Hi, looking for an assmelby programmer for x86 today . Yes March 11. for a small project take only an hour or so. I am paying $30 or oOB paypal for it, please emaile me oxyigen@gmail.com Again, it is today only, and need it done by 6pm PST. This is … | |
In this book I'm using, Sams Teach your self C++, it says to: Start compiler, choose file, choose Win32 Console Application, choose empty project, choose C++ source file, edit source code, choose build, check that you have know build errors and run the program. Whats the difference betweeen Build and … | |
Hi there, I'm trying to print an ms word file using vb. Before it will go to printer, I want the document file to be viewable but not editable. Can anyone help me. Thanks, Note: I was able to view the doc file but it is editable. I am using … | |
i am suppossed to write a program using an array of strings to hold the words of the ICAO alphabet, and index the array by the positions of the letters of the alphabet. I started it off but cannot figure it out please help!! #include <iostream> const int n_row=26; const … | |
I had the idea in my head to write a program that would let you select more than one image you want to set as your windows desktop wallpaper and have it rotate it every day, or every time you boot up or something similar. I really don't know where … | |
I have a first-in-first-out queue implementation such that when it is first initialized, a malloc is called to set aside memory for items that will be placed on the queue. When I am done with the queue, how do I free up the memory? My code for the queue is … | |
[php] #include <iostream> #include <cmath> using namespace std; class point { public: point(int xcoord , int ycoord); //constructor point(); int getX(); int getY(); double getDistance( point otherPoint ); void setpnt(point p); private: int x, y; }; class rectangle { public: rectangle(point p1, point p2, point p3, point p4); void perimeter(); … | |
hi administrator, I'm a beginner in c++.I need to draw a graph(x vs y type).I used graphics.h and ended up with a very primitive version of a graph.The graph appears like a scribbling in the top left corner of the screen.I don't know how to draw the x and y … | |
Hi there, I am working on an assignment that I have to create a menu. The user is suppose to select the menu and change form color. But I have no idea how to that. Help please. Anyone? | |
ok here is my question, i use borland c++ builder 3 and in a book i found an example for a graphics.h program which is supposed to work but i have heard that this only works in dos mode not in windows (which i am running in) is there another … | |
I am new at programming and need help: #include <iostream> #include <cmath> using namespace std; int main() { int a, b, c, area, tri_area; area = tri_area(a, b, c); if area (area>0); cout << "Area is "<<area<<"!"<<endl; cout << " Those values tri_angle " <<endl; } double tri_area (double a, … | |
Hello ladies and gents, I'm starting on the next exercise, but I'm puzzled a bit and was wondering if any of you might help me with this. I have to enter four integer numbers, non negative and smaller then 16 into ONE variable int x, now, the thing I was … | |
I am having a problem with inputs. I can get the input using the cin command but i want to use the input to open a file with the inputs name ie the user types in FRED. cin>>name i want to open a file called fred.txt ifstream in("name.txt"); the above … | |
The assignment is to read and keep records and perform statistical analysis for a class of students. This is what I have done so far,then the codes can show the information(Id,4quizes,exam) of each students on screen. But I need to show 3 more things (The Highest ,The Lowest,The Average of … | |
Uber newbie here. Have downloaded three different form scripts but none of them will actually send the email. Using yahoo small business standard hosting which says they support php. The form appears to work, it refers to the correct page, but no email. I don't know how to enable logs … | |
I have a couple of questions about the main function. Do you need to put the ; after the last }? Do you need to put a return statement before the last }? If so, what number do you put in the (), i.e. return (0), return (1), etc. What … | |
hey i am making a game and decided that i want to put a load/save option in it and was wondering if anyone here knew how to do this, (the program has to be able to close, open again and load the progress from before). I am running in windows … | |
Can someone help me find the error that keeps this prg from running thanx [code] #include <iostream> #include <vector> using namespace std; int main() { vector<int>v(1,1); v.push_back(2);v.push_back(3);v.push_back(4); vector<int>::iterator i=v.begin(); vector<int>::iterator j=i+2;cout<<*j<<""; i+=3;cout<<*i<<""; j=i-1;cout<<*j<<""; j-=2; cout<<*j<<""; cout<<v[1]<<endl; //output 1 (j<i)?cout<<"j<i":cout<<"not(j<i)";cout<<endl; //output 2 (j>i)?cout<<"j>i":cout<<"not(j>i)";cout<<endl; //output 3 i=j; i<=J&&j<=i?cout<<"i and j equal":cout<<"i and … | |
I had all of this program finished except for the plotting like a week ago...Ever since then, I've been trying to figure out how to plot the stupid polynomials..I thought I had it, but the program seems to go crazy whenever it's suppose to repaint..It's like repainting components on top … | |
hello there ....can someone help me solve my problem of my assignment....i try to code it....so I need some guidances ... This is the question... An operating systems uses shortest job first scheduling for it’s process management. Assume that there are 10 processes waiting in a queue which is implemented … | |
i am having a problem with a function i am writing that takes in a txt file and stores the data in 3 arrays. The data file is always rows containing three numbers such as 1 2 3 2 3 4 5 6 7 8 9 10 with each column … |
The End.