49,761 Topics
| |
Hi every one. This is my first Post. I am an electronic engineer and currently enrolled in MS Embedded Systems Engineering. In my project, i have to interface an Altera DE3 board to a windows based PC and achieve a data transfer rate of 100+ Mbps usin USB port. The … | |
Could you please help me with the source code for the following Task: [IMG]http://www.2and2.net/files/492254f5267f5.png[/IMG] | |
hi, I'm a beginner as far as c++ and i need help on writting a program. [B]Given[/B] sin x = x – (x^3/3!) + (x^5/5!) – (x^7/7!) + (x^9/9!) ….. where x is in radian. cos x = 1 – (x^2/2!) + (x^4/4!) – (x^6/6!) + (x^8/8!) ….. where x … | |
Hello. I'm having 2 difficulties... 1) I am trying to print out a string with spaces... Functions used: addSong and printSong For ex: (This is not the whole code...I'm pointing out the functions that it is used in) [CODE=Cplusplus] void addSong(mp3Type*& first, mp3Type*& last) { cout<<"Song title: "; cin>>songTitle; getline(cin,songTitle); … | |
I am needing some help with my CS114 project. I am not expecting people here to do it for me just to help me with it. The project is to do a Sudoku game with a 2d array (9x9) and read in a txt file that the instructor has supplied. … | |
I do not want a negative number input for radius, length, width, base, height. How would I do this. My code is below. It should be pretty self explanatory. Thanks. [CODE][code=syntax] #include <iostream> #include <cmath> using namespace std; int main () { double const pi=3.14159; int radius, length, width, base, … | |
Hi. I have written a small test socket program that uses a background thread that accepts tcp connections and adds them to a connection list that is accessed by main(). When a connection is opened, then later closed, recv() is called (see line highlighted in code below), which throws an … | |
[code=cplusplus] int main() { string name; cout << "Please enter the filename of the encoded message:"; getline(cin,name); ifstream infile; infile.open(name.c_str()); if (infile.fail()) { cout << name << " fail to open." << endl; exit(1); } cout << name << endl; cout << " File successfully opened" << endl; string buffer; … | |
hi, I get a crash as "Unhandled exception at 0x5f4335bb (MFC42D.DLL) in VMFirewall.exe: 0xC0000005: Access violation reading location 0x00000000." in D:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\src\mfc\appmodul.cpp in _tWinMain() funtion at call of AfxWinMain(hInstance, hPrevInstance, lpCmdLine, nCmdShow); This crash is in both debug and release....i have tried ignore of mfc42D.lib and mfcs42d.lib....but … | |
My dev-c++ compiler is telling me that ios::noreplace is not a valid member of std::ios. Why? | |
Well, this is for the same assignment as my last post. It's just a simple implementation of a bunch of Algorithm functions. It throws a runtime exception at the end saying the stack around the b variable was corrupted! I commented out all the lines with that use the b … | |
I'm working on an assignment for school where my teacher wants me to convert each member of an array of a class if it's int member is greater than 300. I can make it work for the first value of 300, since that's what find_if returns. But how do I … | |
Hello, I am really new in the C++ environment. As part of a video project i want to compare a master binary mpeg4 file whose size is about 20 meg bytes size to numerous video ( ex up to 30) mpeg4 clips of appproximately 1 meg each. My aim is … | |
int& fun(){ int a = 10; cout << &a << endl; return a; } int main() { int& r = fun(); cout << r << endl; cout << &r << endl; return 0; } outputs of the code above are: 0xbf8567b4 10 0xbf8567b4 and when i change `int& r = … | |
hi everyone i am new to C++ need help; //Write a program that for 5 books with this atributes //books name //authors name //publishing year //book price to be selected only the books from the same year typed by the user(using structures) | | |
Can anyone let me know how I could include a variable within a system command? (This is a win32 project and not an application.) I am using: (some code taken out) [ICODE] system(("set path=%path%;"[COLOR="Red"]+user[/COLOR]).c_str()); system(("set CLASSPATH=.;"[COLOR="Red"]+usertwo[/COLOR]).c_str()); system(("java -Djava.security.manager -Djava.security.policy="[COLOR="Red"]+user+[/COLOR]"\examplepolicy Xsys").c_str());[/ICODE] Thanks in advance!!! | |
I am having a problem writing the last part of my code for this program. There is a DFS function that I need to write that is included in the header file of the graph.h my program. Here is the sample of code that my instructor gave me. [code=c++]template<class VertexType> … | |
I'm getting an unresolved symbols linking error with this code, the cpp files compile successfully separately, I just can't build the solution and run it. any ideas? header.h [code=c++] #include <iostream> #include <string> using std::string; using namespace std; class Double { private: double dub; char str[50]; public: Double(); Double(char s[50]); … | |
[code=C++] int MAX_NUM = 600851475143; int max = 0; vector <int> ints; for(int i = 1; i <= MAX_NUM; ++i) if((int)MAX_NUM % i == 0) ints.push_back(i); cout << "size = " << ints.size(); [/code] I get 0. Something is wrong. I get 2 warnings: warning C4305: 'initializing' : truncation from … | |
i was given this question by my instructor and i am completely in the dark on what to do. i have been trying to figure out what to do but couldn't find anything in the book that really explained it. any help with this would be greatly appreciated. explain what … | |
Don't know what is wrong with this, it's giving me an error on the 'if (isalpha(string[i]))' line..I had it working earlier but then decided to put it into a function and it's not working now. It's giving the error "expected primary-expression before '[' token " for that line and the … | |
Hello, I'm having trouble with this program. What I have to do is open a file(in this case link.dat) and then the user chooses what they want to do, take something out of it, add somethng to it, print it. It opens the file fine, but then I cant get … | |
please help me write a function which will return the last element in an unsorted list. the prototype of the function should be ItemType ReturnLastItem(); we should assume that the list is not empty ans it shouldnt change after the program is executed.. pleeeeeeeeease help me | |
Hey guys i was just wondering i have a code that will allow you to output times 4 different ways but instead of times i want it to output dates 4 different ways. [code=C++] #include <iostream> using std::cout; #include <iomanip> using std::setfill; using std::setw; using std::endl; #include "Time.h" // include … | |
Hi . I want a program that receive a number and print its subcollections . like this : n=3 : cout : {} , {A} , {B} , {C} , {A,B} , {A,C} , {B,C} , {A,B,C} (with one of the A,B,C , ... characters .) Please help me . … | |
I am trying to write a program that can be used to display two random numbers to be added together. This program should wait for the answer to be input. If the answer is correct display a statement that says that is correct. If the answer is wrong it needs … | |
Create a class called Employee that includes three pieces of information as data members – a first name (type string), a last name (type string) and a monthly salary (type int). Your class should have a constructor that initializes the three data members. Provide a set and a get function … | |
hey guys, I've seemingly exhausted all the possibilities within my limited knowledge, so I'm coming here for some assistance. heres the problem: Read the 20 students info into an array, assign the relevant grade, find the highest score, and print out all the names/scores in addition to the student/s of … |
The End.