General C++ Programming - March 2013 (Page 38)

Code structure question (again)
 
I am still in doubt with the flow of the following code: void haha(int k) { bebe(k); //another function call for(int i = 1; i<10; i++) { if(cond...
[3 replies] Last: Sorry I missed the for loop (indentation would make your program easie... (by jlb)
Reading and writing variable binary width data
 
I'm stuck trying to figure out how to read and write an arbitrary number of bits from/to a file stream. For instance, how to repeatedly read 9 bits from a fi...
[5 replies] Last: #include <limits> #include <iostream> #include <string> #include <bit... (by JLBorges)
Maintain variable between multiple process
 
Hi, In the existing code,fork has call parallel to create process.my job is to store all the process id into vector so that we can verify the status of the job...
[1 reply] : Your scenario is difficult to understand without some more details. F.... (by tcs)
Reading a txt file
 
Guys, can you help me in this problem: A cpp program that reads a text file named "employee.txt", which contains: EMPO1, Juan, 1 EMPO2, Pedro, 2 The pro...
[2 replies] Last: I'm getting difficulty in containing the EMPO1, Name, and Level from t... (by m1rv9n41v5)
Challanging algorithm for all possible combinations
 
A few days ago I got a "bright idea" to see if I could match a string, with an arbitrary length from 1 to 12, to its formulated sequence by using an algorithm t...
[14 replies] Last: A more novel implementation. Note that sequences are not generated in... (by cire)
by nadav
visual studio 2010 GUI ASAP
 
hey everybody, I need to include a project in another within one solution. I am working on a project in visual studio 2010 which is called face_detection ...
[no replies]
by cod3x
can you help me its showing 1 error
 
#include<iostream.h> #include<conio.h> #include<math.h> float area(int,int,int) { float arearec(int l,int b); int l,b,o; o=l*b; return o; } { int...
[7 replies] Last: Variables declared in main are only available in main. Variables decl... (by Stewbond)
Why wont my int health() function return a value?
 
#include <iostream> using namespace std; class person { private: int health; int stregnth; public: ...
[1 reply] : It is returning a value. It returns 40. To print it, you do cout <<a.... (by Smac89)
Delete from a singly linked list
 
I am trying to remove numbers that are less than a calculated average from a SSL. Here is the section where I am running into error. I am having trouble at ...
[no replies]
C++ Template Parameter automatically with Class Name
 
I have a triple hierarchy class: template<class T> class Singleton; class Base; class Sub : public Base, public Singleton<Sub>; I' using underlyin...
[9 replies] Last: > You can put C++ code in an extern "C", but the declarations must be ... (by JLBorges)
prime factorization
 
Okay, so I've decided to start learning some C++ on my own, well sort of. I'm running xCode 4 on my Mac and I decided to start learning some C++ by going throug...
[6 replies] Last: Sometimes it helps to work out how it would work if you were doing it ... (by cire)
Program help needed!
 
I am working on a program that asks the user to input the first 4 digits of a phone number, the computer generates all possible phone numbers that meet the new ...
[4 replies] Last: I got it to work! Thanks (by ITnerdybird)
Flow of c++ code..
 
Just a simple question... code: void haha(int k) { bebe(k); //another function call for(int i = 1; i<10; i++) { if(condition) { do1; do2; d...
[17 replies] Last: Oh, so the moment the function is called, the for loop still continues... (by qwepoi123)
Flow of execution of programme
 
Just a simple question... code: void example() { for(int i=0; i<10; i++) { if(condition 1) { line 1; line 2; ...
[2 replies] Last: Never does until you add a *GASP* Goto statement or another function ... (by cire)
How do I compare the similarity of two vectors?
 
This is possibly more of an algorithm question rather than c++ related. Suppose I have two vectors: std::vector<double> first = {1.0,2.01,3.05,4.05}; s...
[6 replies] Last: I suppose I could quantify the degree of similarity in terms of the fo... (by ausairman)
Getting error with getline and argv
 
My objective is to check to see if a number is odd or even and print it to the screen just to make sure its working correctly. The data file contains: 138 ...
[2 replies] Last: getline takes a string (by closed account Dy7SLyTq)
by itou
Managed Vs unmanaged C++ CLI
 
can someone help me to convert this code to a managed code please struct token_t { TokenTypes_t TokenType; string TokenString; union { Key...
[no replies]
help with returning pointer that points to an array
 
I have a program that is trying to find all factors of an integer given. It needs to be done in a recursion function. Right now i have code similar to just gett...
[10 replies] Last: Look at your man pages for rand() or random() to generate random numbe... (by tcs)
Function that returns a integer value and displays it
 
Is it possible to create a function that can both return and display a value. I was trying to make a program that computes and prints terms of the Fibonacci ser...
[3 replies] Last: #include <iostream> using namespace std; int fibb(int n1 = 1, int n2... (by Stewbond)
Help with my code?
 
ccc
[4 replies] Last: @stewbond Thanks so much!!!!!! (by closed account EApGNwbp)
March 2013 Pages: 1... 3637383940... 51
  Archived months: [feb2013] [apr2013]

This is an archived page. To post a new message, go to the current page.