49,761 Topics

Member Avatar for
Member Avatar for Sam56

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 …

Member Avatar for hiddepolen
0
83
Member Avatar for Leppie

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 …

Member Avatar for Fbody
0
209
Member Avatar for simply_viks

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.... …

Member Avatar for Fbody
0
98
Member Avatar for dorien

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 …

Member Avatar for dorien
0
2K
Member Avatar for Lazarrus

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 …

Member Avatar for alwaysLearning0
0
73
Member Avatar for superchica08

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 …

Member Avatar for superchica08
0
241
Member Avatar for wiran_03

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,...:)

Member Avatar for sundip
0
68
Member Avatar for cheaboy

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 …

Member Avatar for SgtMe
-2
33
Member Avatar for sadia.ab

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 …

Member Avatar for jonsca
0
150
Member Avatar for goocreations

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 …

Member Avatar for goocreations
0
162
Member Avatar for nickcolb

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; …

Member Avatar for griswolf
0
132
Member Avatar for HBK_100

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

Member Avatar for HBK_100
0
90
Member Avatar for dgreene1210

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> …

Member Avatar for Taywin
0
172
Member Avatar for garu525

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 …

Member Avatar for WaltP
0
168
Member Avatar for aznlitomik3

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 …

Member Avatar for aznlitomik3
0
643
Member Avatar for totalwar235

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 …

Member Avatar for totalwar235
0
88
Member Avatar for zulqarnain ali

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.

Member Avatar for bobbyspeechrec
0
152
Member Avatar for kuchick32

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 …

Member Avatar for jonsca
0
122
Member Avatar for cortez716

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 …

Member Avatar for daviddoria
0
118
Member Avatar for Lando_

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() …

Member Avatar for Lando_
0
1K
Member Avatar for heidik

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 …

Member Avatar for Taywin
0
3K
Member Avatar for schoenfelder.p

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 …

Member Avatar for Taywin
0
102
Member Avatar for ixmike88

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 …

Member Avatar for mike_2000_17
0
703
Member Avatar for Armistice

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 …

Member Avatar for Armistice
0
455
Member Avatar for nautolian

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 …

Member Avatar for nautolian
0
117
Member Avatar for frogboy77

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? …

Member Avatar for frogboy77
0
95
Member Avatar for |hex

:) 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 …

Member Avatar for |hex
0
143
Member Avatar for aaronmk2

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]; …

Member Avatar for mrnutty
0
999
Member Avatar for qtl

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 …

0
53
Member Avatar for Sohelp
Member Avatar for Sohelp
0
135

The End.