49,761 Topics
| |
File does not work.Does not record information.Please help! -Enter of a keyboard and a file into an array (by adding) data to 30 girls #include <iostream> #include<fstream> #include <stdio.h> #include <stdlib.h> #include <string> using namespace std; #define N 30 FILE *fp; struct girl { char number[10]; int age; int bust … | |
write a C++ program which inputs litre consumption given in miles/gallon and which translates these figures into the litres/kilometre format which is more common in Europe.Use the following conversion factors: 1 mile=1.609km and 1 gallon= 3.785litres | |
Assume that I have a vector: x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] What I need to do is split this vector into block sizes of `blocksize` with an `overlap` `blocksize = 4` `overlap = 2` The result, would be a … | |
Hi, I'm now studying Bachelor of Science in Information Technology. I want to ask everyone if I can count on you if I ever bump into some problems coding. I'm new to programming. Thank you. | |
I am using c++ with sqlite3 I have a database(test.db) with a table of testTable inside the testTable it has the following attribute _id|randomText I tried inserting a randomText into the database after my input but it's not inserting into the database. my code http://pastebin.com/TvuNqFsF need help. thanks | |
can anyone help me to create a program that alows me to make a regular conversation with the computer? | |
i just want to whether there is a replacement for getch() in C++. my friend said getch() is C function. thanks! | |
so if I have const int SIZE = 4; and a while loop const int SIZE = 4; int counter = 0; while(true) { // do something ... if(SIZE == counter+1) {cout << "Hello world"} } why is this not working? and how is the right way to do it? | |
This is the problem: Write a class whose constructor takes a vector of Student objects, where each Student has a name of type string and a score of type int. The class internally stores the data passed to it in its constructor. The class should have an overloaded output operator … | |
I want this program to wait untill I copy some text into my clipboard. This is what I have done so far char text[500] ; HANDLE clip ; if ( OpenClipboard (NULL) ) cout << "\nClipboard opened" ; EmptyClipboard () ; cout << "\nStart" ; while ( true ) { … | |
Hello Every body My question is very simple for you all experts, as I am learning how to write C++ program. I need a code for summing up the 4 corner of 2D array in turbo C++. Thank you all with regards | |
Hi All, I got this code from a forum & tried it on g++/Linux. In the code below i put NULL to a pointer variable but didnt get any errors. #include <iostream> using namespace std; class A { private: int _dmember; public: void func() { cout<<"Inside A!! "<<endl; cout<<_dmember; // … | |
As any experienced programmer must know the famous problem of "Edit Distance", however this problem is considered an “alternating chain” if you have alternately made case sensitive. Example: "AaAaAbB" "B" "a" "aBaCdEf" Alternating chains are considered in our problem. We only have one operation that is permitted in exchange for … | |
Can somebody please tell me what is wrong in here or what does this error message means : " error : reguest for member 'name' in 'person',which is of non-class type 'Person[2]' " struct Person{ int days; string name; }; const int size = 2; bool way_to_Sort(const Person &a, const … | |
Please can somebody help me with the line of codes of this question:write a C++ program which inputs litre consumption given in miles/gallon and which translates these figures into the litres/kilometre format which is more common in Europe.Use the following conversion factors: 1 mile=1.609km and 1 gallon= 3.785litres | |
I am using visual studio 2013. I am just a Beginner. Trying to make a shutdown Program in c++. its give the errors. 'Shutdown.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file. 'Shutdown.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file. 'Shutdown.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot … | |
Hi, I am trying to prepare a shared library using another shared library. but the second shared library does not contian the definations of funtions which are defined in first shared library. lets say i have libfirst.so. in this there are no undefined functions. while creating libsecond.so, i am linking … | |
Let me try to explain a problem I have.I have built array of structures that contains int(num of days) and string(Name).So basicy user should enter name of a friend and days they last talked,and then make a list sorted by the names of the friends of by how recently it … | |
Okay so I'm kinda stumped... here are our directions.. My code is at the bottom of this post "Write a program consisting of only the main function, called piApproximator.cpp. When your program begins, the user is prompted to enter a number n representing the number of terms to be used … | |
i just want to ask, why we need to declare the header on the upper part of our syntax. | |
Hi I'm having a little trouble understanding C++ string arguments if that's what you call them. The below example illustrates. I'm not sure I understand what line 14 does. The vector 'myvector' is passed to myfunction (called on line 35. I'm assuming string w takes in the first value of … | |
I wrote this function I plan on using to load in .obj files from Blender into a DirectX application. The problem I'm having is that when when the model is loaded, it appears that every other triangle face is missing in a pattern, for every quad, only 1 traingle is … | |
Hello, I'm trying to approach .dll's. Tried some tutorials and got into 2 problems: 1. Using rundll32 from the command line is not working as expected. I write in cmd: "rundll32 mydll.dll MsgBox -32". It shows the MessageBox with text "15991798", changing every time I run it. 2. Calling a … | |
I need the programs to these algorithms. These are the algorithms of the programs of Insertion & Deletion. I need the C++ programs. Insertion temp1 & temp2 are strings 1. temp1= substring (T, 0, ip) 2. temp2= substring (T, ip, length(T) - ip + 1) 3. concatenate (temp1, P) 4. … | |
| |
Hey guys :) Can anyone show me a tutorial for game development in C++. Btw I'm on a mac so I can't go to the DirectX tutorial. Can you please avoid www.cprogramming.com because I dont like it. Thanx anyways :) | |
I'm trying to run a binary sort that sorts through a list of randomly generated numbers, but for some reason isn't working. It will usually tell me if the highest or lowest numbers are in the array, but acts like a spaz on the middle ones. I keep fiddling with … | |
i want to write a program of 10 bank account users. then i want a help , how i write a program. in program i need a print or out put of 10 bank user like name,account no,branch no,account amount. if user press Yes then it gives the out put … | |
Hi, Is there any way in C++ to select and read the last modified file from a unix directory? Let say the o/p of the ls -t is : abc.txt myfile.txt .... .... last_file.txt I want to select this last file ( can be of any name) and read the … | |
Hi all, I would like to pose a design pattern to discussion that is achieved in two different ways. Imagine the situation where you have an interface "IFoo" (aka virtual) and implementations "FooA", "FooB", ... that inherit and implement "IFoo". Now you want the user (of the library you are … |
The End.