49,761 Topics
| |
Alrighty guys, so say I have something like this: cout <<"hello"; cout <<"how ya doin?"; cout <<"goodbye."; i know that it is somehow possile to write it something like this: cout <<"hello"; <<"how ya doin?"; <<"goodbye."; How would one properly format the block of code with only one cout? I … | |
Advice sought? Hi, I'm trying to create a program that when run ten times (closing inbetween) then throws up a message. My thoughts on this is to get my application to create a dat file storing 0 (Zero) in it, then have my application read the dat file for input … | |
when m compiling my program in vs version 8.it is giving following error. error C2086: 'DWORD WINIPI' : redefinition see declaration of 'WINIPI' error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Included header: <Psapi.h> C++ Linker Additional Dependencies: "Psapi.lib" #define DPSAPI_VERSION (1). any help.... … | |
Hello, I need to find repeated sequences within a vector. I have been thinking about using search, as is described [URL="http://www.cplusplus.com/reference/algorithm/search/"]here[/URL]. But this uses an array to search, I don't need to use extra memory, as I am seaching for sequences [B]within[/B] the same vector. Any suggestions on how to … | |
Hi I am trying to print a binary search tree using a while loop and a stack. While I know that this is easier to do using recursion, for the sake of it I would prefer to do it this way and I keep running into either an infinite loop … | |
hello I have done this program that prompts the user to input the length of the sides of a triangle and outputs the shape of the triangle. Using an enumeration type, triangleType, that has the values scalene, isosceles, equilateral, and notTriangle. so the problem i ma having with the program … | |
Hi, I would like to ask a simple program on how to send data using C++ to serial port.... just a simple one,... Thanks to all,...:) | |
alright guys, first time i'm doing this. seriously need some help. willing to pay via paypal. its probably a simple solution but i feel like an idiot right now, i dont need you to do it for me but if you walked me through it and at least answered my … | |
plz help me in programming the proble sttement is as Problem Statement: Calculating No. of A Grades in Class You are required to write a program which should take input from user in the form of characters A or B. Based upon user’s input you should calculate no. of A … | |
I have an array with a bunch of values (the length of the array can vary): [CODE]int a[] = {1, 6, 9, 4, 3, 7, 5};[/CODE] I want to generate all possible combinations available. The problem is that the size of the subset may vary. The user may for instance … | |
I am in dire need of help. I have written this program to output the first 4 perfect number, numbers whose divisors can be added to produce the original number, and the code just sits there and does nothing when ran. [CODE]#include<iostream> using namespace std; int main() { int counter=1; … | |
I have a string array for example string name[5]={"A","B","B"} I am accepting an string input from a user and want to check it against that of the array. cout<<Enter letter; cin>>letter; if(toupper(letter)==name[0]) { ............ ........... } but i am getting an error | |
hey I was wondering if anyone out here can help me with C++ and also adding a loop at the end to be able to ask the user if they want to look up another part. attached is the string code i was given. #include <fstream> #include <iostream> #include <string> … | |
Hello, I'm trying to create a program that reads data from outside file using functions. My goal is to get data from an outside file, and use that data for other functions that i havent created yet. this is my code so far but it wont read and giving me … | |
Write a program to compute the square root of a number. DO NOT USE any math libraries in this program. You will be using the Babylonian method (a.k.a. Heron’s method) to approximate the square root. More information is available on wikipedia: [url]http://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method[/url] To calculate the square root of x, the … | |
i am trying to use my program to move north, east, south, west using the first letter of the full word. though, whenever i run my code and get to this point my coordinates do not update and i remain stuck at 4,6(or 5,6). can anyone help me with this … | |
I need some help in speech recognition project please help me which tool i use and how many steps it required meens main functionality of speech recognition if any one have code please give me for my help please. | |
I have mostly the entire program done but I am having a couple issues. I need to get titles of five movies from the user and store them in the proper member variable for each instance of the five movies at the end of the program. This is what I … | |
I have written a code that will post random numbers into a 10x10 row/col setup. I'm trying to edit the last function of code so that the user see's something like this: Input a number 5 5 was found 3 times 5 is located at row 2, col 1; row … | |
The problem states to use a loop display character from the ASCII codes 0 through 127 and to display 16 character per line. I am using Borland C++ 4.5 so I need the older programming way of doing it. This is what i have so far. [CODE]#include <iostream.h> int main() … | |
Hello everyone Could any one please help me parsing a line having different fields separated through commas. I want to store each comma separated sub string in a struct member variable. The lines are being read from a file. [code]105:1:CME,20100601,07:34:22.796,GRC,GE,201009,FUT,XGGRC,0G4LHZ013,14ijpol1vsu7l7,Fill,0000D9DB,B,00000,99.155,2,99.155,20100601,07:27:34[/code] for example the line ID which is "105:1:CME" is one … | |
I'm new to Visual Studio 2010 and whenever I create a new project I can't actually create new files or add files to the project. The only option under the Project menu is "Rescan Solution". There is no "Add New Item..." or "Add Existing Item..." option. Why is this? Is … | |
hi, im getting this error: [quote]Unhandled exception at 0x00c11005 in bnetconnection.exe: 0xC0000005: Access violation reading locaiton 0x00c11005[/quote] in this particular instance, what i got from the debugger is that 0x00c11005 is my _ProcessCommands function dll: [code]#include <iostream> using namespace std; extern "C" _declspec(dllexport) void ProcessCommands( const char*, const char*, const … | |
Hi. Another newbie here looking for some insight. I have a menu drivin program with 5 functions. got first 3 down and the 4th wants me to read a plain text fil and output the length of the longest line. I know as far as getline(infile,str). where str is just … | |
Hi all, I'm trying to make a program that breaks an entered sentence into seperate words, then compares the words to a predefined txt file of words. So far I have the following code, but it just doesnt work for some reason. no errors or anything. It asks for the … | |
hi again, i'm just full of problems. i have a vectors of ints and i am trying to find a way to check if there is a repeatting sequence within the vector and what size this sequence is. Does anyone have any suggestions on how i should go about this? … | |
:) my project consists of me making my own two pass assembler for my systems programming class. i have finished pass 1, my code complies and everything, but, when i try to make it read an input file, it states that it is never found. i dont know what to … | |
I am having trouble figuring out what the recursive function does in the insert sort. Wouldn't the recursive line block the rest of the code from working. I am just looking for a quick explanation. [CODE] void insertion_sort-recur(int a[], int n){ if(n<=1) return; insertion-sort_recur(a, n-1);//how does this line work temp=a[n-1]; … | |
Anybody experienced this? I upgraded my desktop to Fedora 14 today. Then my programs written for icc can not run. 1. programs with #include<iomanip> can be compiled by icc, g++ is fine solution: copy old version of iomanip to local directory, and change code to #include"iomanip" 2. programs are not … | |
Sinx= x- (x3/3!)+ (x5/5!)- (x7/7!)+....... I can't solve it Please help me........ |
The End.